summaryrefslogtreecommitdiffstats
path: root/ipaclient
diff options
context:
space:
mode:
authorAlexander Bokovoy <[email protected]>2018-05-17 17:49:27 +0300
committerRob Crittenden <[email protected]>2018-05-17 16:55:42 -0400
commitc61151f6aa0c033834aed70561fc762c06176555 (patch)
treea64b1100605e338329092db7942a6dbc9b4709ac /ipaclient
parenta0eaa742343de194ecef2ff7c9e3c74e7f35f51f (diff)
downloadfreeipa-c61151f6aa0c033834aed70561fc762c06176555.tar.gz
freeipa-c61151f6aa0c033834aed70561fc762c06176555.tar.xz
freeipa-c61151f6aa0c033834aed70561fc762c06176555.zip
pylint3: workaround false positives reported for W1662
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 <[email protected]>
Diffstat (limited to 'ipaclient')
-rw-r--r--ipaclient/csrgen.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipaclient/csrgen.py b/ipaclient/csrgen.py
index 1cf24d227..e7573beca 100644
--- a/ipaclient/csrgen.py
+++ b/ipaclient/csrgen.py
@@ -144,8 +144,8 @@ class Formatter(object):
for rule in field_mapping.data_rules]
data_sources = []
- for rule in field_mapping.data_rules:
- data_source = rule.options.get('data_source')
+ for xrule in field_mapping.data_rules:
+ data_source = xrule.options.get('data_source')
if data_source:
data_sources.append(data_source)
OSZAR »