summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2014-07-25 18:14:11 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2014-07-25 18:14:11 +0200
commit585ca0b785e85c3f25f38f0511fb21246b35ec2a (patch)
treec929398325398a0a9ff322ec81d4c97717f695a3
parent11698d722c469b70308aab0fc3fde5a651b0eb9c (diff)
parentd8dd92949f5ec8263dfffcfd102c09fd927e2628 (diff)
downloadpylint-585ca0b785e85c3f25f38f0511fb21246b35ec2a.tar.gz
Merged logilab/pylint into default
-rw-r--r--checkers/format.py38
-rw-r--r--checkers/imports.py5
-rw-r--r--test/test_func.py2
3 files changed, 20 insertions, 25 deletions
diff --git a/checkers/format.py b/checkers/format.py
index 7b5eb64..cb31256 100644
--- a/checkers/format.py
+++ b/checkers/format.py
@@ -104,30 +104,26 @@ MSGS = {
'bracket or block opener.'),
{'old_names': [('C0323', 'no-space-after-operator'),
('C0324', 'no-space-after-comma'),
- ('C0322', 'no-space-before-operator')]})
+ ('C0322', 'no-space-before-operator')]}),
+ 'W0331': ('Use of the <> operator',
+ 'old-ne-operator',
+ 'Used when the deprecated "<>" operator is used instead '
+ 'of "!=".',
+ {'maxversion': (3, 0)}),
+ 'W0332': ('Use of "l" as long integer identifier',
+ 'lowercase-l-suffix',
+ 'Used when a lower case "l" is used to mark a long integer. You '
+ 'should use a upper case "L" since the letter "l" looks too much '
+ 'like the digit "1"',
+ {'maxversion': (3, 0)}),
+ 'W0333': ('Use of the `` operator',
+ 'backtick',
+ 'Used when the deprecated "``" (backtick) operator is used '
+ 'instead of the str() function.',
+ {'scope': WarningScope.NODE, 'maxversion': (3, 0)}),
}
-if sys.version_info < (3, 0):
-
- MSGS.update({
- 'W0331': ('Use of the <> operator',
- 'old-ne-operator',
- 'Used when the deprecated "<>" operator is used instead '
- 'of "!=".'),
- 'W0332': ('Use of "l" as long integer identifier',
- 'lowercase-l-suffix',
- 'Used when a lower case "l" is used to mark a long integer. You '
- 'should use a upper case "L" since the letter "l" looks too much '
- 'like the digit "1"'),
- 'W0333': ('Use of the `` operator',
- 'backtick',
- 'Used when the deprecated "``" (backtick) operator is used '
- 'instead of the str() function.',
- {'scope': WarningScope.NODE}),
- })
-
-
def _underline_token(token):
length = token[3][1] - token[2][1]
offset = token[2][1]
diff --git a/checkers/imports.py b/checkers/imports.py
index 3242b75..5964a26 100644
--- a/checkers/imports.py
+++ b/checkers/imports.py
@@ -139,8 +139,9 @@ MSGS = {
'Used a module marked as deprecated is imported.'),
'W0403': ('Relative import %r, should be %r',
'relative-import',
- 'Used when an import relative to the package directory is \
- detected.'),
+ 'Used when an import relative to the package directory is '
+ 'detected.',
+ {'maxversion': (3, 0)}),
'W0404': ('Reimport %r (imported line %s)',
'reimported',
'Used when a module is reimported multiple times.'),
diff --git a/test/test_func.py b/test/test_func.py
index da34397..225efc8 100644
--- a/test/test_func.py
+++ b/test/test_func.py
@@ -58,8 +58,6 @@ class TestTests(testlib.TestCase):
except KeyError:
continue
not_tested -= self.PORTED
- if PY3K:
- not_tested.remove('W0403') # relative-import
self.assertFalse(not_tested)