Skip to content

Commit 63b235e

Browse files
committed
fix: remove duplicates in list-versions output
When we tell the provider to look at both sdists and wheels, and there are both types of files, it returns some versions multiple times. Remove any duplicates before printing the output.
1 parent ecbd0ca commit 63b235e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/fromager/commands/list_versions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def list_versions(
129129
else:
130130
raise click.ClickException(f"No versions found for {req.name}")
131131

132-
versions: list[Version] = sorted(candidate.version for candidate in candidates)
132+
versions: list[Version] = sorted(set(candidate.version for candidate in candidates))
133133
logger.info(f"Found {len(versions)} version(s)")
134134

135135
for version in versions:

0 commit comments

Comments
 (0)