Skip to content

Commit

Permalink
Created tuple of triggers for optionality in spec
Browse files Browse the repository at this point in the history
Co-authored-by: Casper Welzel Andersen <CasperWA@users.noreply.github.com>
  • Loading branch information
ml-evs and CasperWA committed Mar 17, 2020
1 parent 8a7b926 commit 6715bfc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,12 @@ def parse_spec_for_filters(_):

filters = []
optional_filters = []
optional_triggers = ("OPTIONAL",)
for line in specification_flines:
if ":filter:" in line:
for _split in line.replace("filter=", "").split(":filter:")[1:]:
_filter = _split.split("`")[1].strip()
if "OPTIONAL" in line:
if any(trigger in line for trigger in optional_triggers):
optional_filters.append(_filter)
else:
filters.append(_filter)
Expand Down

0 comments on commit 6715bfc

Please sign in to comment.