diff options
author | Cosmin Poieana <cmin@ropython.org> | 2015-02-14 15:39:33 +0200 |
---|---|---|
committer | Cosmin Poieana <cmin@ropython.org> | 2015-02-14 15:39:33 +0200 |
commit | b72aaeb372cf50df0dd1b00369db88a12faef33f (patch) | |
tree | 8321aa04e046392e9ca0258607a919119ff9f6f3 | |
parent | da068f8d4ce1748ab73d208f052525b8f11dfe5a (diff) | |
download | pylint-b72aaeb372cf50df0dd1b00369db88a12faef33f.tar.gz |
Add warning for "unichr" in Python 3
Closes issue #472
-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 8c5e125..1ca3f9c 100644 --- a/checkers/python3.py +++ b/checkers/python3.py @@ -267,6 +267,11 @@ class Python3Checker(checkers.BaseChecker): 'Used when the intern built-in is referenced ' '(Moved to sys.intern in Python 3)', {'maxversion': (3, 0)}), + 'W1635': ('unichr built-in referenced', + 'unichr-builtin', + 'Used when the unichr built-in is referenced ' + '(Use char in Python 3)', + {'maxversion': (3, 0)}), } _bad_builtins = frozenset([ @@ -284,6 +289,7 @@ class Python3Checker(checkers.BaseChecker): 'reduce', 'round', # Not missing, but incompatible semantics 'StandardError', + 'unichr', 'unicode', 'xrange', 'reload', diff --git a/test/unittest_checker_python3.py b/test/unittest_checker_python3.py index c8ca4b8..a7d31ba 100644 --- a/test/unittest_checker_python3.py +++ b/test/unittest_checker_python3.py @@ -55,6 +55,7 @@ class Python3CheckerTest(testutils.CheckerTestCase): 'round', 'reduce', 'StandardError', + 'unichr', 'unicode', 'xrange', 'reload', |