mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-30 16:43:45 +00:00
Add new PythonRequest::Any
and VersionRequest::Any
variants (#7517)
Follow-up to https://github.com/astral-sh/uv/pull/7514 and #7526 adding the `Any` variants again with slightly different semantics (i.e., they allow pre-releases) We'll be able to use this in https://github.com/astral-sh/uv/pull/7508 to avoid querying a bunch of alternative interpreters unnecessarily in the non-list case.
This commit is contained in:
parent
0f9a2e3870
commit
09a2ebca8b
5 changed files with 66 additions and 24 deletions
|
@ -305,7 +305,7 @@ impl ManagedPythonInstallation {
|
|||
pub fn satisfies(&self, request: &PythonRequest) -> bool {
|
||||
match request {
|
||||
PythonRequest::File(path) => self.executable() == *path,
|
||||
PythonRequest::Default => true,
|
||||
PythonRequest::Default | PythonRequest::Any => true,
|
||||
PythonRequest::Directory(path) => self.path() == *path,
|
||||
PythonRequest::ExecutableName(name) => self
|
||||
.executable()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue