Skip to content

Commit 7308942

Browse files
authored
Rephrase misleading Multiple directories found assertion in _find_info_directory (#5160)
1 parent a64911f commit 7308942

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

setuptools/build_meta.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,9 @@ def _find_info_directory(self, metadata_directory: StrPath, suffix: str) -> Path
357357
candidates = [f for f in dirs if f.endswith(suffix)]
358358

359359
if len(candidates) != 0 or len(dirs) != 1:
360-
assert len(candidates) == 1, f"Multiple {suffix} directories found"
360+
assert len(candidates) == 1, (
361+
f"Exactly one {suffix} should have been produced, but found {len(candidates)}: {candidates}"
362+
)
361363
return Path(parent, candidates[0])
362364

363365
msg = f"No {suffix} directory found in {metadata_directory}"

0 commit comments

Comments
 (0)