Skip to content

Commit 9bbf1e0

Browse files
committed
BUG: Remove unused test when setting suffixes
This commit partially reverts 775776e (ENH: Initialize default list of suffixes) removing unused test when setting the suffix variable. It also ensures there are no duplicated prefixes.
1 parent 673c8cc commit 9bbf1e0

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

codespell.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,10 +388,7 @@ def main():
388388

389389
bad_words = []
390390

391-
if not args.suffix:
392-
suffixes = list(SUFFIX2MIME.keys())
393-
else:
394-
suffixes = args.suffix
391+
suffixes = [*set(args.suffix)] # remove duplicates
395392

396393
if any([args.brief, output_lvl >= 0]):
397394
print(f"Prefixes: {prefixes}")

0 commit comments

Comments
 (0)