summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <cpopa@cloudbasesolutions.com>2015-04-16 13:42:48 +0300
committerClaudiu Popa <cpopa@cloudbasesolutions.com>2015-04-16 13:42:48 +0300
commitb3d33ccf2ce0c5436b61bb2f8c9c98f602506761 (patch)
treea2fa5a5668ed23ffc78908012bc636dbb0acd812
parent3aeab3a1de09763cc749bc239d71cf6b81616530 (diff)
downloadpylint-b3d33ccf2ce0c5436b61bb2f8c9c98f602506761.tar.gz
Replace some strings with a global variable, for clarity.
-rw-r--r--pylint/checkers/variables.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py
index f4fc853..da294c1 100644
--- a/pylint/checkers/variables.py
+++ b/pylint/checkers/variables.py
@@ -48,7 +48,7 @@ def _is_from_future_import(stmt, name):
for local_node in module.locals.get(name, []):
if (isinstance(local_node, astroid.From)
- and local_node.modname == '__future__'):
+ and local_node.modname == FUTURE):
return True
@@ -425,7 +425,7 @@ builtins. Remember that you should avoid to define new builtins when possible.'
msg = "%s imported as %s" % (imported_name, as_name)
self.add_message('unused-import', args=msg, node=stmt)
elif (isinstance(stmt, astroid.From)
- and stmt.modname != '__future__'):
+ and stmt.modname != FUTURE):
if SPECIAL_OBJ.search(imported_name):
# Filter special objects (__doc__, __all__) etc.,