diff options
-rw-r--r-- | CONTRIBUTORS.txt | 2 | ||||
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | tests/regrtest_data/duplicate_data_raw_strings/first.py | 11 | ||||
-rw-r--r-- | tests/regrtest_data/duplicate_data_raw_strings/second.py | 11 | ||||
-rw-r--r-- | tests/test_self.py | 8 |
5 files changed, 34 insertions, 0 deletions
diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 9b3c69550..4bcf7a1b9 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -387,3 +387,5 @@ contributors: * Daniel R. Neal (danrneal): contributer * Jeremy Fleischman (jfly): contributer + +* Shiv Venkatasubrahmanyam @@ -22,6 +22,8 @@ Release date: TBA * Add an faq detailing which messages to disable to avoid duplicates w/ other popular linters +* Fix a bug with `ignore-docstrings` ignoring all lines in a module + What's New in Pylint 2.5.3? =========================== diff --git a/tests/regrtest_data/duplicate_data_raw_strings/first.py b/tests/regrtest_data/duplicate_data_raw_strings/first.py new file mode 100644 index 000000000..687c5922e --- /dev/null +++ b/tests/regrtest_data/duplicate_data_raw_strings/first.py @@ -0,0 +1,11 @@ +r"""A raw docstring. +""" + + +def look_busy(): + xxxx = 1 + yyyy = 2 + zzzz = 3 + wwww = 4 + vvvv = xxxx + yyyy + zzzz + wwww + return vvvv diff --git a/tests/regrtest_data/duplicate_data_raw_strings/second.py b/tests/regrtest_data/duplicate_data_raw_strings/second.py new file mode 100644 index 000000000..687c5922e --- /dev/null +++ b/tests/regrtest_data/duplicate_data_raw_strings/second.py @@ -0,0 +1,11 @@ +r"""A raw docstring. +""" + + +def look_busy(): + xxxx = 1 + yyyy = 2 + zzzz = 3 + wwww = 4 + vvvv = xxxx + yyyy + zzzz + wwww + return vvvv diff --git a/tests/test_self.py b/tests/test_self.py index 6c27fd6cd..34e5d1290 100644 --- a/tests/test_self.py +++ b/tests/test_self.py @@ -783,3 +783,11 @@ class TestRunTC: path = join(HERE, "regrtest_data", "unused_variable.py") expected = "Your code has been rated at 7.50/10" self._test_output([path, "--jobs=2", "-ry"], expected_output=expected) + + def test_duplicate_code_raw_strings(self): + path = join(HERE, "regrtest_data", "duplicate_data_raw_strings") + expected_output = "Similar lines in 2 files" + self._test_output( + [path, "--disable=all", "--enable=duplicate-code"], + expected_output=expected_output, + ) |