Skip to content

Commit

Permalink
More terse set-conversion code
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc committed May 13, 2024
1 parent 057b529 commit d3266a4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions proselint/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,7 @@ def reverse_existence_check(
text, list, err, msg, ignore_case=True, offset=0
):
"""Find all words in ``text`` that aren't on the ``list``."""
if ignore_case:
permitted = set([word.lower() for word in list])
else:
permitted = set(list)
permitted = set([word.lower() for word in list] if ignore_case else list)
allowed_word = functools.partial(
_allowed_word, permitted, ignore_case=ignore_case)

Expand Down

0 comments on commit d3266a4

Please sign in to comment.