From 3233222c560b0dff2074358aa2d94ed12e516a2b Mon Sep 17 00:00:00 2001 From: Cezar Date: Sat, 19 Sep 2015 15:41:16 +0300 Subject: Use enumarete() instead of range() --- pylint/checkers/imports.py | 6 +++--- 1 file 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 != '*': -- cgit v1.2.1