URL:
https://github.com/freeipa/freeipa/pull/1945
Author: abbra
Title: #1945: [backport 4.6] pylint3: workaround false positives reported for W1662
Action: opened
PR body:
"""
Pylint3 falsely reports warning W1662: using a variable that was bound
inside a comprehension for the cases where the same name is reused for a
loop after the comprehension in question.
Rename the variable in a loop to avoid it.
If the code looks like the following:
arr = [f for f in filters if callable(f)]
for f in arr:
result = result + f()
pylint3 would consider 'f' used outside of comprehension. Clearly, this
is a false-positive warning as the second 'f' use is completely
independent of the comprehension's use of 'f'.
Reviewed-By: Aleksei Slaikovskii <aslaikov(a)redhat.com>
(cherry picked from commit c61151f6aa0c033834aed70561fc762c06176555)
"""
To pull the PR as Git branch:
git remote add ghfreeipa
https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/1945/head:pr1945
git checkout pr1945