diff --git a/ChangeLog b/ChangeLog index d9a20be99b..2e47d45fe7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,11 +8,15 @@ Release date: TBA * bad-continuation and bad-whitespace have been removed, black or another formatter can help you with this better than Pylint -Close #246, #289, #638, #747, #1148, #1179, #1943, #2041, #2301, #2304, #2944, #3565 + Close #246, #289, #638, #747, #1148, #1179, #1943, #2041, #2301, #2304, #2944, #3565 * The no-space-check option has been removed. It's no longer possible to consider empty line like a `trailing-whitespace` by using clever options -Close #1368 + Close #1368 + +* mixed-indentation has been removed, it is no longer useful since TabError is included directly in python3 + + Close #2984 #3573 What's New in Pylint 2.5.1? =========================== diff --git a/doc/whatsnew/2.6.rst b/doc/whatsnew/2.6.rst index 10f6f455f6..92a72e3c0b 100644 --- a/doc/whatsnew/2.6.rst +++ b/doc/whatsnew/2.6.rst @@ -19,3 +19,5 @@ Other Changes * `bad-continuation` and `bad-whitespace` have been removed. `black` or another formatter can help you with this better than Pylint * The `no-space-check` option has been removed, it's no longer possible to consider empty line like a `trailing-whitespace` by using clever options. + +* `mixed-indentation` has been removed, it is no longer useful since TabError is included directly in python3 diff --git a/pylint/checkers/format.py b/pylint/checkers/format.py index af35bd1a93..ae7cf4260e 100644 --- a/pylint/checkers/format.py +++ b/pylint/checkers/format.py @@ -149,11 +149,6 @@ "Used when an unexpected number of indentation's tabulations or " "spaces has been found.", ), - "W0312": ( - "Found indentation with %ss instead of %ss", - "mixed-indentation", - "Used when there are some mixed tabs and spaces in a module.", - ), "W0301": ( "Unnecessary semicolon", # was W0106 "unnecessary-semicolon", @@ -744,13 +739,6 @@ def check_indent_level(self, string, expected, line_num): level += 1 suppl = "" while string and string[0] in " \t": - if string[0] != indent[0]: - if string[0] == "\t": - args = ("tab", "space") - else: - args = ("space", "tab") - self.add_message("mixed-indentation", args=args, line=line_num) - return level suppl += string[0] string = string[1:] if level != expected or suppl: @@ -762,7 +750,6 @@ def check_indent_level(self, string, expected, line_num): line=line_num, args=(level * unit_size + len(suppl), i_type, expected * unit_size), ) - return None def register(linter): diff --git a/tests/functional/m/mixed_indentation.py b/tests/functional/m/mixed_indentation.py deleted file mode 100644 index 724ecff7aa..0000000000 --- a/tests/functional/m/mixed_indentation.py +++ /dev/null @@ -1,10 +0,0 @@ -"""test mixed tabs and spaces""" -from __future__ import print_function - -def spaces_func(): - """yo""" - print("yo") - -def tab_func(): - """yo""" # [mixed-indentation] - print("yo") # [mixed-indentation] diff --git a/tests/functional/m/mixed_indentation.txt b/tests/functional/m/mixed_indentation.txt deleted file mode 100644 index d4857e6665..0000000000 --- a/tests/functional/m/mixed_indentation.txt +++ /dev/null @@ -1,2 +0,0 @@ -mixed-indentation:9::Found indentation with tabs instead of spaces -mixed-indentation:10::Found indentation with tabs instead of spaces