Skip to content

Commit 48f738f

Browse files
committed
black re-format
1 parent a8ab0c1 commit 48f738f

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

comment_spell_check/comment_spell_check.py

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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

tests/test_comment_spell_check.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
""" Test suite for the comment_spell_check command line tool. """
1+
"""Test suite for the comment_spell_check command line tool."""
32

43
# ==========================================================================
54
#
@@ -25,6 +24,7 @@
2524

2625
class TestCommentSpellCheck(unittest.TestCase):
2726
"""Test class for comment_spell_check command line tool."""
27+
2828
@classmethod
2929
def setUpClass(cls):
3030
"""Setting up comment_spell_check tests"""

0 commit comments

Comments
 (0)