diff options
author | Anthony VEREZ <anthony.verez.external@cassidian.com> | 2012-09-19 15:58:28 +0200 |
---|---|---|
committer | Anthony VEREZ <anthony.verez.external@cassidian.com> | 2012-09-19 15:58:28 +0200 |
commit | 59c4fa85078ce0d6c46c0cb417e5947f72459e39 (patch) | |
tree | 55ed2bdc920fdd02611a4f7031f8e4bbf25ec72c | |
parent | 4b316ba0b51d4a63cf7ad3523a3121c1b7276f2a (diff) | |
download | pylint-git-59c4fa85078ce0d6c46c0cb417e5947f72459e39.tar.gz |
fix R0801 similarities bug. Closes #63424
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | checkers/similar.py | 2 | ||||
-rw-r--r-- | doc/features.txt | 2 | ||||
-rw-r--r-- | test/unittest_lint.py | 5 |
4 files changed, 7 insertions, 6 deletions
@@ -17,6 +17,8 @@ ChangeLog for PyLint * #103656: fix W0231 false positive for missing call to object.__init__ (patch by lothiraldan@gmail.com) + * #63424: fix similarity report disabling by properly renaming it to RP0801 + * #103949: create a console_scripts entry point to be used by easy_install, buildout and pip @@ -25,6 +27,7 @@ ChangeLog for PyLint * stop including tests files in distribution, they causes crash when installed with python3 (#72022, #82417, #76910) + 2012-07-17 -- 0.25.2 * #93591: Correctly emit warnings about clobbered variable names when an except handler contains a tuple of names instead of a single name. @@ -55,7 +58,6 @@ ChangeLog for PyLint * fix potential crashes with utils.safe_infer raising InferenceError - 2011-12-08 -- 0.25.1 * #81078: Warn if names in exception handlers clobber overwrite existing names (patch by tmarek@google.com) diff --git a/checkers/similar.py b/checkers/similar.py index 2907e39dc..8f8859363 100644 --- a/checkers/similar.py +++ b/checkers/similar.py @@ -237,7 +237,7 @@ class SimilarChecker(BaseChecker, Similar): ), ) # reports - reports = ( ('R0801', 'Duplication', report_similarities), ) # XXX actually a Refactoring message + reports = ( ('RP0801', 'Duplication', report_similarities), ) def __init__(self, linter=None): BaseChecker.__init__(self, linter) diff --git a/doc/features.txt b/doc/features.txt index 84a8b3fc3..1050c15cc 100644 --- a/doc/features.txt +++ b/doc/features.txt @@ -154,7 +154,7 @@ Messages Reports ~~~~~~~ -:R0801: Duplication +:RP0801: Duplication string_format checker diff --git a/test/unittest_lint.py b/test/unittest_lint.py index 6f8aacbb2..2ccc7c9b3 100644 --- a/test/unittest_lint.py +++ b/test/unittest_lint.py @@ -1,4 +1,4 @@ -# Copyright (c) 2003-2007 LOGILAB S.A. (Paris, FRANCE). +# Copyright (c) 2003-2012 LOGILAB S.A. (Paris, FRANCE). # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later @@ -240,8 +240,7 @@ class PyLinterTC(TestCase): self.assertFalse(any(name in checker_names for name in should_not)) def test_disable_similar(self): - # XXX we have to disable them both, that's no good - self.linter.set_option('reports', False) + self.linter.set_option('disable', 'RP0801') self.linter.set_option('disable', 'R0801') self.assertFalse('similarities' in [c.name for c in self.linter.prepare_checkers()]) |