@@ -83,17 +83,13 @@ def extract_warnings_from_compiler_output(
83
83
for i , line in enumerate (compiler_output .splitlines (), start = 1 ):
84
84
if match := compiled_regex .match (line ):
85
85
try :
86
- compiler_warnings .append (
87
- {
88
- "file" : match .group ("file" ).removeprefix (path_prefix ),
89
- "line" : match .group ("line" ),
90
- "column" : match .group ("column" ),
91
- "message" : match .group ("message" ),
92
- "option" : match .group ("option" )
93
- .lstrip ("[" )
94
- .rstrip ("]" ),
95
- }
96
- )
86
+ compiler_warnings .append ({
87
+ "file" : match .group ("file" ).removeprefix (path_prefix ),
88
+ "line" : match .group ("line" ),
89
+ "column" : match .group ("column" ),
90
+ "message" : match .group ("message" ),
91
+ "option" : match .group ("option" ).lstrip ("[" ).rstrip ("]" ),
92
+ })
97
93
except AttributeError :
98
94
print (
99
95
f"Error parsing compiler output. "
@@ -151,7 +147,6 @@ def get_unexpected_warnings(
151
147
"""
152
148
unexpected_warnings = {}
153
149
for file in files_with_warnings .keys ():
154
-
155
150
rule = is_file_ignored (file , ignore_rules )
156
151
157
152
if rule :
@@ -201,13 +196,11 @@ def get_unexpected_improvements(
201
196
if rule .file_path not in files_with_warnings .keys ():
202
197
unexpected_improvements .append ((rule .file_path , rule .count , 0 ))
203
198
elif len (files_with_warnings [rule .file_path ]) < rule .count :
204
- unexpected_improvements .append (
205
- (
206
- rule .file_path ,
207
- rule .count ,
208
- len (files_with_warnings [rule .file_path ]),
209
- )
210
- )
199
+ unexpected_improvements .append ((
200
+ rule .file_path ,
201
+ rule .count ,
202
+ len (files_with_warnings [rule .file_path ]),
203
+ ))
211
204
212
205
if unexpected_improvements :
213
206
print ("Unexpected improvements:" )
0 commit comments