summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCezar <celnazli@bitdefender.com>2015-09-19 15:41:16 +0300
committerCezar <celnazli@bitdefender.com>2015-09-19 15:41:16 +0300
commit3233222c560b0dff2074358aa2d94ed12e516a2b (patch)
treebc454f0b73a1a58c6468506b66b17643645f0a74
parentdb13406de00af99a299aaf728f103f82947ace20 (diff)
downloadpylint-3233222c560b0dff2074358aa2d94ed12e516a2b.tar.gz
Use enumarete() instead of range()
-rw-r--r--pylint/checkers/imports.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pylint/checkers/imports.py b/pylint/checkers/imports.py
index b66f6aa..5c8936b 100644
--- a/pylint/checkers/imports.py
+++ b/pylint/checkers/imports.py
@@ -288,10 +288,10 @@ given file (report RP0402 must not be disabled)'}
self._check_relative_import(modnode, node, importedmodnode, basename)
self._check_deprecated_module(node, basename)
- for i in range(len(node.names)):
- if node.names[i] in node.names[i + 1:]:
+ for i, name in enumerate(node.names):
+ if name in node.names[i + 1:]:
self.add_message('reimported', node=node,
- args=(node.names[i][0], node.fromlineno))
+ args=(name[0], node.fromlineno))
for name, _ in node.names:
if name != '*':