Skip to content

Commit

Permalink
fix empty union
Browse files Browse the repository at this point in the history
  • Loading branch information
mzuenni committed Dec 18, 2024
1 parent 21ba141 commit be31eab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def problem_stats(problems):

def count(path):
if type(path) is list:
return set.union(*(count(p) for p in path))
paths = [*(count(p) for p in path)]
return set.union(*paths) if paths else set()
if callable(path):
return path(generated_testcases)
results: set[str | Path] = set()
Expand Down

0 comments on commit be31eab

Please sign in to comment.