You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -280,7 +280,7 @@ The rules for this behavior are as follows:
280
280
281
281
1. If a configuration file is passed directly, Ruff does not attempt to infer a missing `target-version`.
282
282
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.
284
284
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.
285
285
286
286
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