Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop unnecessary check in RequirementSet.add_requirement #7706

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/pip/_internal/req/req_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ def add_requirement(

# Unnamed requirements are scanned again and the requirement won't be
# added as a dependency until after scanning.
# TODO: Check if [install_req] is needed, change to [] to check
# Means -> can we depend on unnamed requirements?
if not install_req.name:
self.add_unnamed_requirement(install_req)
return [install_req], None
Expand Down Expand Up @@ -149,11 +151,6 @@ def add_requirement(
# We'd want to rescan this requirement later
return [install_req], install_req

# Assume there's no need to scan, and that we've already
# encountered this for scanning.
if install_req.constraint or not existing_req.constraint:
return [], existing_req

does_not_satisfy_constraint = (
install_req.link and
not (
Expand Down