Skip to content

Commit

Permalink
Merge pull request #8248 from McSinyx/ireq-get-direct
Browse files Browse the repository at this point in the history
Fix typo and simplify ireq call
  • Loading branch information
pfmoore authored May 16, 2020
2 parents c74577e + 2994037 commit f34f8d5
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
Empty file.
2 changes: 1 addition & 1 deletion src/pip/_internal/resolution/resolvelib/candidates.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def __init__(self, py_version_info):
def name(self):
# type: () -> str
# Avoid conflicting with the PyPI package "Python".
return "<Python fom Requires-Python>"
return "<Python from Requires-Python>"

@property
def version(self):
Expand Down
5 changes: 0 additions & 5 deletions src/pip/_internal/resolution/resolvelib/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
if MYPY_CHECK_RUNNING:
from typing import Any, Dict, Optional, Sequence, Set, Tuple, Union

from pip._internal.req.req_install import InstallRequirement
from pip._vendor.packaging.version import _BaseVersion

from .base import Requirement, Candidate
Expand Down Expand Up @@ -105,10 +104,6 @@ def sort_key(c):

return sorted(matches, key=sort_key)

def get_install_requirement(self, c):
# type: (Candidate) -> Optional[InstallRequirement]
return c.get_install_requirement()

def identify(self, dependency):
# type: (Union[Requirement, Candidate]) -> str
return dependency.name
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_internal/resolution/resolvelib/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def resolve(self, root_reqs, check_supported_wheels):

req_set = RequirementSet(check_supported_wheels=check_supported_wheels)
for candidate in self._result.mapping.values():
ireq = provider.get_install_requirement(candidate)
ireq = candidate.get_install_requirement()
if ireq is None:
continue
ireq.should_reinstall = self.factory.should_reinstall(candidate)
Expand Down

0 comments on commit f34f8d5

Please sign in to comment.