summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcpopa <devnull@localhost>2014-01-18 00:09:45 +0200
committercpopa <devnull@localhost>2014-01-18 00:09:45 +0200
commit6158e88a3684aa67215ba809cbb7890a73b057d9 (patch)
treeb7a677c642b379d711867009ab5588d20acf6191
parent4688e5d469264157f2c39d389fc1a25797c4ccdf (diff)
downloadpylint-6158e88a3684aa67215ba809cbb7890a73b057d9.tar.gz
Use symbolic name.
-rw-r--r--checkers/variables.py6
-rw-r--r--test/test_func.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/checkers/variables.py b/checkers/variables.py
index df049c6..09dc5af 100644
--- a/checkers/variables.py
+++ b/checkers/variables.py
@@ -220,7 +220,9 @@ builtins. Remember that you should avoid to define new builtins when possible.'
continue
if elt_name not in node.locals:
if not node.package:
- self.add_message('E0603', args=elt_name, node=elt)
+ self.add_message('undefined-all-variable',
+ args=elt_name,
+ node=elt)
else:
basename = os.path.splitext(node.file)[0]
if os.path.basename(basename) == '__init__':
@@ -228,7 +230,7 @@ builtins. Remember that you should avoid to define new builtins when possible.'
try:
load_module_from_name(name)
except ImportError:
- self.add_message('E0603',
+ self.add_message('undefined-all-variable',
args=elt_name,
node=elt)
except SyntaxError as exc:
diff --git a/test/test_func.py b/test/test_func.py
index 9e4639e..e8c746d 100644
--- a/test/test_func.py
+++ b/test/test_func.py
@@ -58,7 +58,7 @@ class TestTests(testlib.TestCase):
rest = ['I0001',
# XXX : no use case for now :
'W0402', # deprecated module
- 'W0403', # implicit relative import,
+ 'W0403', # implicit relative import
'W0410', # __future__ import not first statement
]
self.assertEqual(todo, rest)