diff --git a/crates/ty/docs/cli.md b/crates/ty/docs/cli.md index c98543117e..ae4382bd5d 100644 --- a/crates/ty/docs/cli.md +++ b/crates/ty/docs/cli.md @@ -72,8 +72,7 @@ over all configuration files.
This is used to specialize the type of sys.platform and will affect the visibility of platform-specific functions and attributes. If the value is set to all, no assumptions are made about the target platform. If unspecified, the current system's platform will be used.
--python-version, --target-version versionPython version to assume when resolving types.
The Python version affects allowed syntax, type definitions of the standard library, and 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.
+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, 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).
Possible values:
3.7