@@ -183,9 +183,7 @@ def remove_contractions(word: str):
183183 logger = logging .getLogger ("comment_spell_check" )
184184 for contraction in CONTRACTIONS :
185185 if word .endswith (contraction ):
186- logger .info (
187- "Contraction: %s -> %s" , word , word [: - len (contraction )]
188- )
186+ logger .info ("Contraction: %s -> %s" , word , word [: - len (contraction )])
189187 return word [: - len (contraction )]
190188 return word
191189
@@ -194,7 +192,7 @@ def remove_prefix(word: str, prefixes: list[str]):
194192 """Remove the prefix from the word."""
195193 for prefix in prefixes :
196194 if word .startswith (prefix ):
197- return word [len (prefix ):]
195+ return word [len (prefix ) :]
198196 return word
199197
200198
@@ -237,10 +235,7 @@ def spell_check_comment(
237235 if len (sub_words ) > 1 and spell_check_words (spell , sub_words ):
238236 continue
239237
240- msg = (
241- f"'{ error_word } ', "
242- + f"suggestions: { spell .candidates (error_word )} "
243- )
238+ msg = f"'{ error_word } ', " + f"suggestions: { spell .candidates (error_word )} "
244239 mistakes .append (msg )
245240
246241 return mistakes
@@ -449,9 +444,7 @@ def comment_spell_check(args):
449444 # f is a directory, so search for files inside
450445 dir_entries = []
451446 for s in suffixes :
452- dir_entries = dir_entries + glob .glob (
453- f + "/**/*" + s , recursive = True
454- )
447+ dir_entries = dir_entries + glob .glob (f + "/**/*" + s , recursive = True )
455448
456449 logger .info (dir_entries )
457450
0 commit comments