fix: exclude tags from exclude_tags during rendering (#711)

This commit is contained in:
Robert Kaussow 2024-06-07 21:30:10 +02:00 committed by GitHub
parent 5760ee0832
commit 9b20c11660
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,12 +72,15 @@ class Parser:
except YAMLError as e: except YAMLError as e:
self.log.sysexit_with_message(f"Unable to read yaml file {rfile}\n{e}") self.log.sysexit_with_message(f"Unable to read yaml file {rfile}\n{e}")
tags = [ tags = []
task.get("tags") for task in raw:
for task in raw task_tags = task.get("tags")
if task.get("tags") if isinstance(task_tags, str):
and task.get("tags") not in self.config.config["exclude_tags"] task_tags = [task_tags]
]
for tag in task_tags:
if tag not in self.config.config["exclude_tags"]:
tags.append(tag)
for tag in flatten(tags): for tag in flatten(tags):
self._data["tag"][tag] = {"value": tag} self._data["tag"][tag] = {"value": tag}