Skip to content

Commit 48fa931

Browse files
committed
simplify skipped links deduplication
1 parent f2727bc commit 48fa931

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
@@ -700,11 +700,9 @@ def make_link_evaluator(self, project_name: str) -> LinkEvaluator:
700700

701701
def skipped_links_requires_python(self):
702702
# type: () -> List[str]
703-
skips = [skip[1] for skip in self._logged_links if 'Requires-Python' in skip[1]]
704-
# cleans duplicate package version found from different links
705-
skips = list(dict.fromkeys(skips))
706-
skips.sort()
707-
return skips
703+
return sorted(
704+
{reason for _, reason in self._logged_links if 'Requires-Python' in reason}
705+
)
708706

709707
def logged_links_rp(self):
710708
# type: () -> List[str]

0 commit comments

Comments
 (0)