Skip to content

Commit 9b2c98d

Browse files
committed
Bug fixes
1 parent 358e0b3 commit 9b2c98d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

comment_spell_check/utils/create_checker.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def create_checker(dict_list: list[str] = None) -> spellchecker.SpellChecker:
3232
if len(dict_list) > 0:
3333
for d in dict_list:
3434
logger.info("Loading additional dictionary from: %s", d)
35-
if type(d) == pathlib.PosixPath:
35+
if isinstance(d, pathlib.PosixPath):
3636
# assume it's a local file path
3737
checker.word_frequency.load_text_file(d)
3838
else:
@@ -44,6 +44,7 @@ def create_checker(dict_list: list[str] = None) -> spellchecker.SpellChecker:
4444
else:
4545
# assume it's a local file path
4646
checker.word_frequency.load_text_file(d)
47-
logger.info("number of words: %s", checker.word_frequency.unique_words)
47+
logger.info("number of words: %s",
48+
checker.word_frequency.unique_words)
4849

4950
return checker

comment_spell_check/utils/parseargs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def create_parser():
6060
dest="dict",
6161
help="File that contains words that will be ignored."
6262
" Argument can be passed multiple times."
63-
" File must contain 1 word per line.",
63+
" File must contain 1 word per line."
6464
" Argument can also be a URL to a text file with words.",
6565
)
6666

0 commit comments

Comments
 (0)