Skip to content

Commit 456a521

Browse files
dylwil3MichaReiser
andauthored
correct description of fallback for user-level settings
Co-authored-by: Micha Reiser <micha@reiser.io>
1 parent b757880 commit 456a521

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ The rules for this behavior are as follows:
280280

281281
1. If a configuration file is passed directly, Ruff does not attempt to infer a missing `target-version`.
282282
1. If a configuration file is found in the filesystem hierarchy, Ruff will infer a missing `target-version` from the `requires-python` field in a `pyproject.toml` file in the same directory as the found configuration.
283-
1. If we are using a user-level configuration from `${config_dir}/ruff/pyproject.toml`, Ruff will infer a missing `target-version` from the `requires-python` field in the first `pyproject.toml` file found in an ancestor of the current working directory.
283+
1. If we are using a user-level configuration from `${config_dir}/ruff/pyproject.toml`, the `requires-python` field in the first `pyproject.toml` file found in an ancestor of the current working directory takes precedence over the `target-version` in the user-level configuration.
284284
1. If no configuration files are found, Ruff will infer the `target-version` from the `requires-python` field in the first `pyproject.toml` file found in an ancestor of the current working directory.
285285

286286
Note that in these last two cases, the behavior of Ruff may differ depending on the working directory from which it is invoked.

0 commit comments

Comments
 (0)