Skip to content

Commit 2c505c0

Browse files
committed
simplify skipped links deduplication
1 parent c1e05b3 commit 2c505c0

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/pip/_internal/index/package_finder.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -696,11 +696,9 @@ def set_prefer_binary(self):
696696

697697
def skipped_links_requires_python(self):
698698
# type: () -> List[str]
699-
skips = [skip[1] for skip in self._logged_links if 'Requires-Python' in skip[1]]
700-
# cleans duplicate package version found from different links
701-
skips = list(dict.fromkeys(skips))
702-
skips.sort()
703-
return skips
699+
return sorted(
700+
{reason for _, reason in self._logged_links if 'Requires-Python' in reason}
701+
)
704702

705703
def make_link_evaluator(self, project_name):
706704
# type: (str) -> LinkEvaluator

0 commit comments

Comments
 (0)