diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-11-25 19:57:40 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-11-25 19:57:40 +0200 |
commit | 66c39e1cd94b7deaa90550d63b0b4708338c20b4 (patch) | |
tree | 4f61e34494cedb95074d842d9ef98fa7ea842ec5 | |
parent | cb96c1029c12469f254d53a01fb0fa2053b5314d (diff) | |
download | pylint-66c39e1cd94b7deaa90550d63b0b4708338c20b4.tar.gz |
Change the variable name to something more suggestive
-rw-r--r-- | pylint/checkers/imports.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/pylint/checkers/imports.py b/pylint/checkers/imports.py index e77522b..f1fe7c8 100644 --- a/pylint/checkers/imports.py +++ b/pylint/checkers/imports.py @@ -339,12 +339,13 @@ given file (report RP0402 must not be disabled)'} # Check imports are grouped by package within a given category met = set() - curr_package = None - for imp in std_imports + ext_imports + loc_imports: - package, _, _ = imp[1].partition('.') - if curr_package and curr_package != package and package in met: - self.add_message('ungrouped-imports', node=imp[0], args=package) - curr_package = package + current_package = None + for import_node, import_name in std_imports + ext_imports + loc_imports: + package, _, _ = import_name.partition('.') + if current_package and current_package != package and package in met: + self.add_message('ungrouped-imports', node=import_node, + args=package) + current_package = package met.add(package) self._imports_stack = [] |