Extend target-version documentation (#6482)

Closes https://github.com/astral-sh/ruff/issues/6462
This commit is contained in:
Zanie Blue 2023-08-10 12:11:37 -05:00 committed by GitHub
parent 6706ae4828
commit 1050c4e104
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View file

@ -464,7 +464,11 @@ pub struct Options {
"#
)]
/// The minimum Python version to target, e.g., when considering automatic
/// code upgrades, like rewriting type annotations.
/// code upgrades, like rewriting type annotations. Ruff will not propose
/// changes using features that are not available in the given version.
///
/// For example, to represent supporting Python >=3.10 or ==3.10
/// specify `target-version = "py310"`.
///
/// If omitted, and Ruff is configured via a `pyproject.toml` file, the
/// target version will be inferred from its `project.requires-python`