Skip to content

Commit

Permalink
Improve reproducibility of sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed May 17, 2024
1 parent 82ec7fa commit 64c36c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/validate_pyproject/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ def iterate_entry_points(group: str = ENTRYPOINT_GROUP) -> Iterable[EntryPoint]:
# TODO: Once Python 3.10 becomes the oldest version supported, this fallback and
# conditional statement can be removed.
entries_ = (plugin for plugin in entries.get(group, []))
deduplicated = {e.name: e for e in sorted(entries_, key=lambda e: e.name)}
deduplicated = {
e.name: e for e in sorted(entries_, key=lambda e: (e.name, e.value))
}
return list(deduplicated.values())


Expand Down

0 comments on commit 64c36c9

Please sign in to comment.