We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0b07215 commit 8b83d56Copy full SHA for 8b83d56
isort/identify.py
@@ -57,6 +57,25 @@ def imports(
57
if skipping_line:
58
continue
59
60
+ stripped_line = line.strip().split("#")[0]
61
+ if stripped_line.startswith("raise") or stripped_line.startswith("yield"):
62
+ if stripped_line == "yield":
63
+ while not stripped_line or stripped_line == "yield":
64
+ try:
65
+ index, next_line = next(indexed_input)
66
+ except StopIteration:
67
+ break
68
+
69
+ stripped_line = next_line.strip().split("#")[0]
70
+ while stripped_line.endswith("\\"):
71
72
73
74
75
76
77
+ continue
78
79
line, *end_of_line_comment = line.split("#", 1)
80
statements = [line.strip() for line in line.split(";")]
81
if end_of_line_comment:
0 commit comments