Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed Jan 17, 2025
1 parent 1f0bae3 commit fde57e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions audformat/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ def join_labels(
if not isinstance(labels, list):
labels = list(labels)

if misc_table_ids := [x for x in labels if isinstance(x, str)]:
if len(misc_table_ids := [x for x in labels if isinstance(x, str)]) > 1:
raise ValueError(
f"The following string values were provided: '"
f"{misc_table_ids}'. "
Expand All @@ -1098,7 +1098,8 @@ def join_labels(
return labels[0]

items = audeer.flatten_list([list(x) for x in labels])
if dtypes := sorted(list({str(type(x)) for x in items})):
dtypes = sorted(list({str(type(x)) for x in items}))
if len(dtypes) > 1:
raise ValueError(
f"Elements or keys must "
f"have the same dtype, "
Expand Down

0 comments on commit fde57e2

Please sign in to comment.