We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e9bc5f3 commit 267716fCopy full SHA for 267716f
src/pip/_internal/commands/show.py
@@ -100,12 +100,11 @@ def _get_requiring_packages(current_dist: BaseDistribution) -> Iterator[str]:
100
except KeyError:
101
continue
102
103
- requires = set()
104
- # Avoid duplicates in requirements due to environment markers
105
- for req in dist.iter_dependencies():
106
- if req.name not in requires:
107
- requires.add(req.name)
108
- requires = sorted(requires, key=str.lower)
+ requires = sorted(
+ # Avoid duplicates in requirements (e.g. due to environment markers).
+ {req.name for req in dist.iter_dependencies()},
+ key=str.lower,
+ )
109
required_by = sorted(_get_requiring_packages(dist), key=str.lower)
110
111
try:
0 commit comments