File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,6 @@ def process(
67
67
made_changes : bool = False
68
68
stripped_line : str = ""
69
69
end_of_file : bool = False
70
- in_line_continuation : bool = False
71
70
72
71
if config .float_to_top :
73
72
new_input = ""
@@ -229,7 +228,7 @@ def process(
229
228
):
230
229
import_section += line
231
230
elif (
232
- stripped_line .startswith (IMPORT_START_IDENTIFIERS ) and not in_line_continuation
231
+ stripped_line .startswith (IMPORT_START_IDENTIFIERS )
233
232
):
234
233
contains_imports = True
235
234
@@ -273,10 +272,9 @@ def process(
273
272
indent = new_indent
274
273
import_section += import_statement
275
274
else :
276
- if stripped_line .endswith ("\\ " ):
277
- in_line_continuation = True
278
- else :
279
- in_line_continuation = False
275
+ while stripped_line .endswith ("\\ " ):
276
+ line += input_stream .readline ()
277
+ stripped_line = line .strip ().split ("#" )[0 ]
280
278
not_imports = True
281
279
282
280
if not_imports :
You can’t perform that action at this time.
0 commit comments