Don't reset indent_char when we encounter E101

This commit is contained in:
Anthony Sottile 2019-09-24 13:53:04 -07:00
parent 121ea4f056
commit fdcec2803a
4 changed files with 20 additions and 28 deletions

View file

@ -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.

View file

@ -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.