Skip to content

Commit

Permalink
Fix --trait and --regex interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
jimorie committed Apr 20, 2023
1 parent 3897360 commit 55befad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thronescli/thronescli.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,12 @@ def preprocess_regex(options):
def preprocess_case(options):
"""Preprocess relevant options for case comparison."""
# These options are always case insensitive
opts = ("trait", "trait_isnt", "set", "keyword", "keyword_isnt")
opts = ("set", "keyword", "keyword_isnt")
for opt in opts:
options[opt] = tuple(value.lower() for value in options[opt])
if not options["case"] and not options["regex"]:
# These options respect the case and regex options
opts = ("text", "text_isnt", "illustrator")
opts = ("text", "text_isnt", "trait", "trait_isnt", "illustrator")
for opt in opts:
options[opt] = tuple(value.lower() for value in options[opt])
if options["name"]:
Expand Down

0 comments on commit 55befad

Please sign in to comment.