[ty] Update docs for Python version inference (#18397)

This commit is contained in:
Alex Waygood 2025-05-30 22:45:28 +01:00 committed by GitHub
parent 88866f0048
commit b390b3cb8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 6 deletions

View file

@ -82,10 +82,10 @@ pub(crate) struct CheckCommand {
/// type definitions of first- and third-party modules that are conditional on the Python version.
///
/// By default, the Python version is inferred as the lower bound of the project's
/// `requires-python` field from the `pyproject.toml`, if available. Otherwise, the latest
/// stable version supported by ty is used, which is currently 3.13.
///
/// ty will not infer the Python version from the Python environment at this time.
/// `requires-python` field from the `pyproject.toml`, if available. Otherwise, if a virtual
/// environment has been configured or detected and a Python version can be inferred from the
/// virtual environment's metadata, that version will be used. If neither of these applies, ty
/// will fall back to the latest stable Python version supported by ty (currently 3.13).
#[arg(long, value_name = "VERSION", alias = "target-version")]
pub(crate) python_version: Option<PythonVersion>,