@@ -83,17 +83,13 @@ def extract_warnings_from_compiler_output(
8383 for i , line in enumerate (compiler_output .splitlines (), start = 1 ):
8484 if match := compiled_regex .match (line ):
8585 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+ })
9793 except AttributeError :
9894 print (
9995 f"Error parsing compiler output. "
@@ -151,7 +147,6 @@ def get_unexpected_warnings(
151147 """
152148 unexpected_warnings = {}
153149 for file in files_with_warnings .keys ():
154-
155150 rule = is_file_ignored (file , ignore_rules )
156151
157152 if rule :
@@ -201,13 +196,11 @@ def get_unexpected_improvements(
201196 if rule .file_path not in files_with_warnings .keys ():
202197 unexpected_improvements .append ((rule .file_path , rule .count , 0 ))
203198 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+ ))
211204
212205 if unexpected_improvements :
213206 print ("Unexpected improvements:" )
0 commit comments