1from typing
import FrozenSet, Iterable, Optional, Tuple, Union
11CandidateLookup = Tuple[Optional[
"Candidate"], Optional[InstallRequirement]]
12CandidateVersion = Union[LegacyVersion, Version]
15def format_name(project: str, extras: FrozenSet[str]) -> str:
18 canonical_extras = sorted(canonicalize_name(e)
for e
in extras)
19 return "{}[{}]".format(project,
",".join(canonical_extras))
24 self, specifier: SpecifierSet, hashes: Hashes, links: FrozenSet[Link]
35 def from_ireq(cls, ireq: InstallRequirement) ->
"Constraint":
42 def __and__(self, other: InstallRequirement) ->
"Constraint":
65 """The "project name" of a requirement.
67 This is different from ``name`` if this requirement contains extras,
68 in which case ``name`` would contain the ``[...]`` part, while this
69 refers to the name of the project.
74 def name(self) -> str:
75 """The name identifying this requirement in the resolver.
77 This is different from ``project_name`` if this requirement contains
78 extras, where ``project_name`` would not contain the ``[...]`` part.
101 """The "project name" of the candidate.
103 This is different from ``name`` if this candidate contains extras,
104 in which case ``name`` would contain the ``[...]`` part, while this
105 refers to the name of the project.
110 def name(self) -> str:
111 """The name identifying this candidate in the resolver.
113 This is different from ``project_name`` if this candidate contains
114 extras, where ``project_name`` would not contain the ``[...]`` part.
119 def version(self) -> CandidateVersion:
Optional[InstallRequirement] get_install_requirement(self)
Iterable[Optional[Requirement]] iter_dependencies(self, bool with_requires)
str format_for_error(self)
NormalizedName project_name(self)
Optional[Link] source_link(self)
"Constraint" from_ireq(cls, InstallRequirement ireq)
None __init__(self, SpecifierSet specifier, Hashes hashes, FrozenSet[Link] links)
"Constraint" __and__(self, InstallRequirement other)
bool is_satisfied_by(self, "Candidate" candidate)
CandidateLookup get_candidate_lookup(self)
str format_for_error(self)
NormalizedName project_name(self)
bool is_satisfied_by(self, "Candidate" candidate)
bool _match_link(Link link, "Candidate" candidate)