mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 14:51:25 +00:00
Clarify requires-python inference requirements (#4918)
This commit is contained in:
parent
b9060ea2bd
commit
ec609f5c3b
2 changed files with 7 additions and 6 deletions
|
@ -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"]"#,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue