from dataclasses import dataclass from pip._vendor.packaging.version import Version from pip._vendor.packaging.version import parse as parse_version from pip._internal.models.link import Link @dataclass(frozen=True) class InstallationCandidate: """Represents a potential "candidate" for installation.""" __slots__ = ["name", "version", "link"] name: str version: Version link: Link def __init__(self, name: str, version: str, link: Link) -> None: object.__setattr__(self, "name", name) object.__setattr__(self, "version", parse_version(version)) object.__setattr__(self, "link", link) def __str__(self) -> str: return f"{self.name!r} candidate (version {self.version} at {self.link})"
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
__init__.py | File | 63 B | 0644 |
|
candidate.py | File | 753 B | 0644 |
|
direct_url.py | File | 6.42 KB | 0644 |
|
format_control.py | File | 2.43 KB | 0644 |
|
index.py | File | 1.01 KB | 0644 |
|
installation_report.py | File | 2.75 KB | 0644 |
|
link.py | File | 20.54 KB | 0644 |
|
scheme.py | File | 575 B | 0644 |
|
search_scope.py | File | 4.42 KB | 0644 |
|
selection_prefs.py | File | 1.97 KB | 0644 |
|
target_python.py | File | 4.17 KB | 0644 |
|
wheel.py | File | 4.43 KB | 0644 |
|