Skip to content

Commit

Permalink
fix(rule.py): ensure all input patterns are regex compiled strings wh…
Browse files Browse the repository at this point in the history
…en giving a list
  • Loading branch information
pgierz committed Jun 26, 2024
1 parent b3ca904 commit 8e6510f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pymorize/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, input_pattern, cmor_variable, actions=None):
if isinstance(input_pattern, str):
self.input_patterns = list(re.compile(input_pattern))
elif isinstance(input_pattern, list):
self.input_patterns = [re.compile(p) for p in input_pattern]
self.input_patterns = [re.compile(str(p)) for p in input_pattern]
else:
raise TypeError("input_pattern must be a string or a list of strings")
self.cmor_variable = cmor_variable
Expand Down

0 comments on commit 8e6510f

Please sign in to comment.