From 6f8715471815ae5b9a76346561b0467f7d7fdc67 Mon Sep 17 00:00:00 2001 From: John Pennycook Date: Wed, 21 Feb 2024 11:25:21 -0800 Subject: [PATCH] Restore missing {} to report outputs Previous versions of CBI used {} to denote sets, for example: - {} for the empty set (unused code) - {CPU, GPU} for the set containing both CPU and GPU When we upgraded to f-strings these braces were accidentally removed. Signed-off-by: John Pennycook --- codebasin/report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codebasin/report.py b/codebasin/report.py index b6bc3cf..00625e6 100644 --- a/codebasin/report.py +++ b/codebasin/report.py @@ -102,7 +102,7 @@ def summary(setmap): data = [] total_count = 0 for pset in sorted(setmap.keys(), key=len): - name = ", ".join(pset) + name = "{" + ", ".join(pset) + "}" count = setmap[pset] percent = (float(setmap[pset]) / float(total)) * 100 data += [[name, str(count), f"{percent:.2f}"]]