mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-04 20:26:53 +00:00
Don't reset indent_char when we encounter E101
This commit is contained in:
parent
121ea4f056
commit
fdcec2803a
4 changed files with 20 additions and 28 deletions
|
|
@ -558,16 +558,13 @@ class FileChecker(object):
|
|||
|
||||
for result_single in result:
|
||||
column_offset, text = result_single
|
||||
error_code = self.report(
|
||||
self.report(
|
||||
error_code=None,
|
||||
line_number=self.processor.line_number,
|
||||
column=column_offset,
|
||||
text=text,
|
||||
line=(override_error_line or physical_line),
|
||||
)
|
||||
self.processor.check_physical_error(
|
||||
error_code, physical_line
|
||||
)
|
||||
|
||||
def process_tokens(self):
|
||||
"""Process tokens and trigger checks.
|
||||
|
|
|
|||
|
|
@ -261,12 +261,6 @@ class FileProcessor(object):
|
|||
)
|
||||
return arguments
|
||||
|
||||
def check_physical_error(self, error_code, line):
|
||||
# type: (str, str) -> None
|
||||
"""Update attributes based on error code and line."""
|
||||
if error_code == "E101":
|
||||
self.indent_char = line[0]
|
||||
|
||||
def generate_tokens(self): # type: () -> Generator[_Token, None, None]
|
||||
"""Tokenize the file and yield the tokens.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue