From be31eabd86f09c9eab4af97a37f6d5c9e24d7436 Mon Sep 17 00:00:00 2001 From: mzuenni Date: Wed, 18 Dec 2024 11:47:07 +0100 Subject: [PATCH] fix empty union --- bin/stats.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/stats.py b/bin/stats.py index d09b08e5..1687771c 100644 --- a/bin/stats.py +++ b/bin/stats.py @@ -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()