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:
self.log.sysexit_with_message(f"Unable to read yaml file {rfile}\n{e}")
tags = [
task.get("tags")
for task in raw
if task.get("tags")
and task.get("tags") not in self.config.config["exclude_tags"]
]
tags = []
for task in raw:
task_tags = task.get("tags")
if isinstance(task_tags, str):
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):
self._data["tag"][tag] = {"value": tag}