mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 10:22:24 +00:00
Extend target-version
documentation (#6482)
Closes https://github.com/astral-sh/ruff/issues/6462
This commit is contained in:
parent
6706ae4828
commit
1050c4e104
2 changed files with 6 additions and 2 deletions
|
@ -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`
|
||||
|
|
2
ruff.schema.json
generated
2
ruff.schema.json
generated
|
@ -560,7 +560,7 @@
|
|||
]
|
||||
},
|
||||
"target-version": {
|
||||
"description": "The minimum Python version to target, e.g., when considering automatic code upgrades, like rewriting type annotations.\n\nIf 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.",
|
||||
"description": "The minimum Python version to target, e.g., when considering automatic code upgrades, like rewriting type annotations. Ruff will not propose changes using features that are not available in the given version.\n\nFor example, to represent supporting Python >=3.10 or ==3.10 specify `target-version = \"py310\"`.\n\nIf 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.",
|
||||
"anyOf": [
|
||||
{
|
||||
"$ref": "#/definitions/PythonVersion"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue