Skip to content

Commit

Permalink
Issue PyCQA#1276: Stop parsing in quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeonjames committed Jul 8, 2020
1 parent 4c72396 commit 851f1e6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions isort/output.py
Expand Up @@ -178,10 +178,9 @@ def sorted_imports(
tail = formatted_output[imports_tail:]

for index, line in enumerate(tail):
in_quote = _in_quote
should_skip, _in_quote, *_ = parse.skip_line(
should_skip, in_quote, *_ = parse.skip_line(
line,
in_quote=_in_quote,
in_quote=False,
index=len(formatted_output),
section_comments=parsed.section_comments,
)
Expand All @@ -194,7 +193,10 @@ def sorted_imports(
continue
next_construct = line
break
elif not in_quote:
elif in_quote:
next_construct = line
break
else:
parts = line.split()
if (
len(parts) >= 3
Expand Down

0 comments on commit 851f1e6

Please sign in to comment.