summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCezar <devnull@localhost>2015-09-20 14:09:38 +0300
committerCezar <devnull@localhost>2015-09-20 14:09:38 +0300
commitc7da422a24ac3ff158016c36adcea1b2b6e222f4 (patch)
tree6221ee3b0fe3b0a4bac08d0fa288c1353a98bbc8
parent26901e6b294531486feef33e6d884a1aeff70247 (diff)
downloadpylint-c7da422a24ac3ff158016c36adcea1b2b6e222f4.tar.gz
Fix some errors
-rw-r--r--pylint/checkers/stdlib.py6
-rw-r--r--pylint/test/functional/duplicate_dict_literal_key.py4
-rw-r--r--pylint/test/functional/duplicate_dict_literal_key.txt2
3 files changed, 6 insertions, 6 deletions
diff --git a/pylint/checkers/stdlib.py b/pylint/checkers/stdlib.py
index 510edeb..f02a992 100644
--- a/pylint/checkers/stdlib.py
+++ b/pylint/checkers/stdlib.py
@@ -228,9 +228,9 @@ class StdlibChecker(BaseChecker):
}
py_version = sys.version_info[:2]
- if (infer.qname() in deprecated[common] or
- py_version in deprecated and
- infer.qname() in deprecated[py_version]):
+ qname = infer.qname()
+ if (qname in deprecated[common] or
+ py_version in deprecated and qname in deprecated[py_version]):
self.add_message('deprecated-method', node=node,
args=(node.func.attrname, ))
diff --git a/pylint/test/functional/duplicate_dict_literal_key.py b/pylint/test/functional/duplicate_dict_literal_key.py
index 6c9f933..3fae8b7 100644
--- a/pylint/test/functional/duplicate_dict_literal_key.py
+++ b/pylint/test/functional/duplicate_dict_literal_key.py
@@ -6,8 +6,8 @@ correct_dict = {
'two': 'for tea',
}
-wrong_dict = {
- 'tea': 'for two', # [duplicate-key]
+wrong_dict = { # [duplicate-key]
+ 'tea': 'for two',
'two': 'for tea',
'tea': 'time',
diff --git a/pylint/test/functional/duplicate_dict_literal_key.txt b/pylint/test/functional/duplicate_dict_literal_key.txt
index fda20cb..9780480 100644
--- a/pylint/test/functional/duplicate_dict_literal_key.txt
+++ b/pylint/test/functional/duplicate_dict_literal_key.txt
@@ -1 +1 @@
-duplicate-key:10::Duplicate key 'tea' in dictionary
+duplicate-key:9::Duplicate key 'tea' in dictionary