File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,25 @@ def imports(
57
57
if skipping_line :
58
58
continue
59
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
+ try :
72
+ index , next_line = next (indexed_input )
73
+ except StopIteration :
74
+ break
75
+
76
+ stripped_line = next_line .strip ().split ("#" )[0 ]
77
+ continue
78
+
60
79
line , * end_of_line_comment = line .split ("#" , 1 )
61
80
statements = [line .strip () for line in line .split (";" )]
62
81
if end_of_line_comment :
You can’t perform that action at this time.
0 commit comments