uv/crates/uv
Charlie Marsh 1557ad1b3c
DRY up some project interpreter validation and discovery (#4658)
## Summary

I noticed that `init_environment` and `find_interpreter` were both
calling `find_environment`, which seemed like a code smell to me.
Instead, `find_interpreter` now returns either a compatible environment
or an interpreter (if no compatible environment was found).

Additionally, `interpreter_meets_requirements` now no longer validates
`requires-python` if `--python` or `.python-version` is set. Instead, we
warn, which matches the behavior we get when creating a new environment
at the bottom of `find_interpreter`.

In total, I think this makes the data flow in project interpreter
discovery less repetitive and easier to reason about.
2024-07-01 12:31:42 +00:00
..
src DRY up some project interpreter validation and discovery (#4658) 2024-07-01 12:31:42 +00:00
tests DRY up some project interpreter validation and discovery (#4658) 2024-07-01 12:31:42 +00:00
Cargo.toml Add PEP 723 support to uv run (#4656) 2024-07-01 08:20:24 -04:00