diff --git a/isort/output.py b/isort/output.py index f4b30304b..cda5c24d8 100644 --- a/isort/output.py +++ b/isort/output.py @@ -184,7 +184,7 @@ def sorted_imports( continue next_construct = line break - elif in_quote: + if in_quote: next_construct = line break diff --git a/isort/parse.py b/isort/parse.py index fe3dd157a..6a999391a 100644 --- a/isort/parse.py +++ b/isort/parse.py @@ -246,8 +246,8 @@ def file_contents(contents: str, config: Config = DEFAULT_CONFIG) -> ParsedConte if import_index >= line_count: break - else: - starting_line = in_lines[import_index] + + starting_line = in_lines[import_index] line, *end_of_line_comment = line.split("#", 1) if ";" in line: