@@ -183,9 +183,7 @@ def remove_contractions(word: str):
183
183
logger = logging .getLogger ("comment_spell_check" )
184
184
for contraction in CONTRACTIONS :
185
185
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 )])
189
187
return word [: - len (contraction )]
190
188
return word
191
189
@@ -194,7 +192,7 @@ def remove_prefix(word: str, prefixes: list[str]):
194
192
"""Remove the prefix from the word."""
195
193
for prefix in prefixes :
196
194
if word .startswith (prefix ):
197
- return word [len (prefix ):]
195
+ return word [len (prefix ) :]
198
196
return word
199
197
200
198
@@ -237,10 +235,7 @@ def spell_check_comment(
237
235
if len (sub_words ) > 1 and spell_check_words (spell , sub_words ):
238
236
continue
239
237
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 )} "
244
239
mistakes .append (msg )
245
240
246
241
return mistakes
@@ -449,9 +444,7 @@ def comment_spell_check(args):
449
444
# f is a directory, so search for files inside
450
445
dir_entries = []
451
446
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 )
455
448
456
449
logger .info (dir_entries )
457
450
0 commit comments