[ty] Default to latest supported python version (#17938)

This commit is contained in:
Micha Reiser 2025-05-08 16:58:35 +02:00 committed by GitHub
parent 5eb215e8e5
commit 067a8ac574
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 85 additions and 6 deletions

View file

@ -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()

View file

@ -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