Skip to content

Commit 9631c56

Browse files
committed
Moved check in check_multiple_remote_repositories
1 parent 55543c1 commit 9631c56

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/pip/_internal/index/package_finder.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,9 +1181,6 @@ def check_multiple_remote_repositories(
11811181
remote_candidates = []
11821182
# If every remote candidate lacks repository metadata (common in tests using raw links),
11831183
# then treat them as coming from a single implicit repository and skip multi-repo checks.
1184-
if all(not rc.remote_repository_urls for rc in remote_candidates):
1185-
logger.debug("All remote candidates lack repository metadata.")
1186-
return None
11871184
# all known remote repositories
11881185
known_remote_repo_urls = set()
11891186
# all known alternate location urls
@@ -1234,6 +1231,10 @@ def check_multiple_remote_repositories(
12341231
logger.debug("No remote candidates for multiple remote repository checks")
12351232
return None
12361233

1234+
if all(not rc.remote_repository_urls for rc in remote_candidates):
1235+
logger.debug("All remote candidates lack repository metadata.")
1236+
return None
1237+
12371238
# Specification: If the project in question only comes from a single repository,
12381239
# then there is no chance of dependency confusion, so there’s no reason to do
12391240
# anything but allow.

0 commit comments

Comments
 (0)