diff options
author | Viorel Stirbu <viorels@gmail.com> | 2015-02-14 14:00:34 +0200 |
---|---|---|
committer | Viorel Stirbu <viorels@gmail.com> | 2015-02-14 14:00:34 +0200 |
commit | da068f8d4ce1748ab73d208f052525b8f11dfe5a (patch) | |
tree | ccbc86633c00779f37d78aa3ad6eb812fe6e3597 | |
parent | 3cdf70f3c4c2713b206775f25df55b0c2e2854fb (diff) | |
download | pylint-da068f8d4ce1748ab73d208f052525b8f11dfe5a.tar.gz |
Add warning for "intern" in Python 3
Closes issue #473
-rw-r--r-- | checkers/python3.py | 6 | ||||
-rw-r--r-- | test/unittest_checker_python3.py | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/checkers/python3.py b/checkers/python3.py index 59c37bf..8c5e125 100644 --- a/checkers/python3.py +++ b/checkers/python3.py @@ -262,6 +262,11 @@ class Python3Checker(checkers.BaseChecker): 'Used when the round built-in is referenced ' '(backwards-incompatible semantics in Python 3)', {'maxversion': (3, 0)}), + 'W1634': ('intern built-in referenced', + 'intern-builtin', + 'Used when the intern built-in is referenced ' + '(Moved to sys.intern in Python 3)', + {'maxversion': (3, 0)}), } _bad_builtins = frozenset([ @@ -273,6 +278,7 @@ class Python3Checker(checkers.BaseChecker): 'execfile', 'file', 'input', # Not missing, but incompatible semantics + 'intern', 'long', 'raw_input', 'reduce', diff --git a/test/unittest_checker_python3.py b/test/unittest_checker_python3.py index 5abab93..c8ca4b8 100644 --- a/test/unittest_checker_python3.py +++ b/test/unittest_checker_python3.py @@ -49,6 +49,7 @@ class Python3CheckerTest(testutils.CheckerTestCase): 'execfile', 'file', 'input', + 'intern', 'long', 'raw_input', 'round', |