mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 22:31:47 +00:00
[ty] Default to latest supported python version (#17938)
This commit is contained in:
parent
5eb215e8e5
commit
067a8ac574
8 changed files with 85 additions and 6 deletions
|
@ -61,7 +61,7 @@ impl Options {
|
|||
.environment
|
||||
.as_ref()
|
||||
.and_then(|env| env.python_version.as_deref().copied())
|
||||
.unwrap_or_default();
|
||||
.unwrap_or(PythonVersion::latest_ty());
|
||||
let python_platform = self
|
||||
.environment
|
||||
.as_ref()
|
||||
|
|
|
@ -103,7 +103,7 @@ impl Project {
|
|||
let major =
|
||||
u8::try_from(major).map_err(|_| ResolveRequiresPythonError::TooLargeMajor(major))?;
|
||||
let minor =
|
||||
u8::try_from(minor).map_err(|_| ResolveRequiresPythonError::TooLargeMajor(minor))?;
|
||||
u8::try_from(minor).map_err(|_| ResolveRequiresPythonError::TooLargeMinor(minor))?;
|
||||
|
||||
Ok(Some(
|
||||
requires_python
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue