var_string = ", ".join(attrs[:-1]) + ", " + attrs[-1]
return f"{sum(counts)} (" + var_string + ")"
elif sum(counts) == 1:
var_string = attrs[0][2:]
return var_string
else:
types = [s for s in ["categorical", "numeric", "time", "string"] if
s in attrs[0]]
After Change
// `isinstance`, which would fail in the above case
var_type_list = [v for v in variables if type(v) is var_type] // pylint: disable=unidiomatic-typecheck
if var_type_list:
not_shown = " (not shown)" if issubclass(var_type, StringVariable)\
else ""
agg.append((f"{var_type_name}{not_shown}", len(var_type_list)))
attrs, counts = list(zip(*agg))
if len(attrs) > 1: