|
OpenQuizz
Une application de gestion des contenus pédagogiques
|
Public Member Functions | |
| def | create (cls, project_name, target_python=None, prefer_binary=False, allow_all_prereleases=False, specifier=None, hashes=None) |
| def | __init__ (self, project_name, supported_tags, specifier, prefer_binary=False, allow_all_prereleases=False, hashes=None) |
| def | get_applicable_candidates (self, candidates) |
| def | sort_best_candidate (self, candidates) |
| def | compute_best_candidate (self, candidates) |
Responsible for filtering and sorting candidates for installation based on what tags are valid.
| def __init__ | ( | self, | |
| project_name, | |||
| supported_tags, | |||
| specifier, | |||
prefer_binary = False, |
|||
allow_all_prereleases = False, |
|||
hashes = None |
|||
| ) |
:param supported_tags: The PEP 425 tags supported by the target
Python in order of preference (most preferred first).
| def compute_best_candidate | ( | self, | |
| candidates | |||
| ) |
Compute and return a `BestCandidateResult` instance.
| def create | ( | cls, | |
| project_name, | |||
target_python = None, |
|||
prefer_binary = False, |
|||
allow_all_prereleases = False, |
|||
specifier = None, |
|||
hashes = None |
|||
| ) |
Create a CandidateEvaluator object.
:param target_python: The target Python interpreter to use when
checking compatibility. If None (the default), a TargetPython
object will be constructed from the running Python.
:param specifier: An optional object implementing `filter`
(e.g. `packaging.specifiers.SpecifierSet`) to filter applicable
versions.
:param hashes: An optional collection of allowed hashes.
| def get_applicable_candidates | ( | self, | |
| candidates | |||
| ) |
Return the applicable candidates from a list of candidates.
| def sort_best_candidate | ( | self, | |
| candidates | |||
| ) |
Return the best candidate per the instance's sort order, or None if no candidate is acceptable.