Skip to content
Permalink
Browse files
fix: allow labels function to return None (#1565)
  • Loading branch information
johanneskoester committed Apr 5, 2022
1 parent 624a83d commit fef74d6406a04e29c115a699e76ac96e4a37cf9e
Showing 1 changed file with 7 additions and 4 deletions.
@@ -229,12 +229,12 @@ def expand_report_argument(item, wildcards, job):

class Category:
def __init__(self, name, wildcards, job):
if name is not None:
name = expand_report_argument(name, wildcards, job)
if name is None:
name = "Other"
self.is_other = True
else:
self.is_other = False
name = expand_report_argument(name, wildcards, job)

self.is_other = name == "Other"
self.name = name
h = hashlib.sha256()
h.update(name.encode())
@@ -548,6 +548,9 @@ def expand_labels(labels, wildcards, job):
return None
labels = expand_report_argument(labels, wildcards, job)

if labels is None:
return None

if not isinstance(labels, dict) or not all(
isinstance(col, str) for col in labels.values()
):

0 comments on commit fef74d6

Please sign in to comment.