Clarify requires-python inference requirements (#4918)

This commit is contained in:
Charlie Marsh 2023-06-07 00:18:56 -04:00 committed by GitHub
parent b9060ea2bd
commit ec609f5c3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View file

@ -436,12 +436,13 @@ pub struct Options {
target-version = "py37"
"#
)]
/// The Python version to target, e.g., when considering automatic code
/// upgrades, like rewriting type annotations.
/// The minimum Python version to target, e.g., when considering automatic
/// code upgrades, like rewriting type annotations.
///
/// If omitted, the target version will be inferred from the
/// `project.requires-python` field in the relevant `pyproject.toml`
/// (e.g., `requires-python = ">=3.8"`), if present.
/// If omitted, and Ruff is configured via a `pyproject.toml` file, the
/// target version will be inferred from its `project.requires-python`
/// field (e.g., `requires-python = ">=3.8"`). If Ruff is configured via
/// `ruff.toml` or `.ruff.toml`, no such inference will be performed.
pub target_version: Option<PythonVersion>,
#[option(
default = r#"["TODO", "FIXME", "XXX"]"#,