summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmile Anclin <emile.anclin@logilab.fr>2010-12-13 16:39:47 +0100
committerEmile Anclin <emile.anclin@logilab.fr>2010-12-13 16:39:47 +0100
commit5f7bfc55810124491422af916e8a54d2c7e1ac7a (patch)
tree21bb3833d0ec4862920b250fee93e075825e9858
parentf2dc5d7fcaad2c508f8950343cb970b7354d3815 (diff)
downloadpylint-git-5f7bfc55810124491422af916e8a54d2c7e1ac7a.tar.gz
pylint itself: remove last pylint error message
-rw-r--r--checkers/variables.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/checkers/variables.py b/checkers/variables.py
index 522741878..45d7aa3c4 100644
--- a/checkers/variables.py
+++ b/checkers/variables.py
@@ -16,6 +16,7 @@
"""variables checkers for Python code
"""
+import sys
from copy import copy
from logilab import astng
@@ -239,7 +240,7 @@ builtins. Remember that you should avoid to define new builtins when possible.'
if is_method and (klass.type == 'interface' or node.is_abstract()):
return
authorized_rgx = self.config.dummy_variables_rgx
- overridden = marker = []
+ called_overridden = False
argnames = node.argnames()
for name, stmts in not_consumed.iteritems():
# ignore some special names specified by user configuration
@@ -257,8 +258,9 @@ builtins. Remember that you should avoid to define new builtins when possible.'
if node.type != 'staticmethod' and name == argnames[0]:
continue
# don't warn for argument of an overridden method
- if overridden is marker:
+ if not called_overridden:
overridden = overridden_method(klass, node.name)
+ called_overridden = True
if overridden is not None and name in overridden.argnames():
continue
if node.name in PYMETHODS and node.name not in ('__init__', '__new__'):
@@ -504,7 +506,6 @@ class VariablesChecker3k(VariablesChecker):
# do not check for not used locals here
self._to_consume.pop()
-import sys
if sys.version_info >= (3, 0):
VariablesChecker = VariablesChecker3k