mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-15 01:05:01 +00:00
Surface dedicated errors for .python-version
conflict with requires-python
(#7218)
## Summary I got confused because I had a `.python-version` file that conflicted with my `requires-python`.
This commit is contained in:
parent
5905f40f50
commit
fe8880bf3c
6 changed files with 191 additions and 50 deletions
|
@ -129,6 +129,12 @@ impl PythonVersionFile {
|
|||
&self.path
|
||||
}
|
||||
|
||||
/// Return the file name of the version file (guaranteed to be one of `.python-version` or
|
||||
/// `.python-versions`).
|
||||
pub fn file_name(&self) -> &str {
|
||||
self.path.file_name().unwrap().to_str().unwrap()
|
||||
}
|
||||
|
||||
/// Set the versions for the file.
|
||||
#[must_use]
|
||||
pub fn with_versions(self, versions: Vec<PythonRequest>) -> Self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue