-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
configurationRelated to settings and configurationRelated to settings and configuration
Description
Problem description
I'm using extend to extend the base configuration from a parent directory, then override isort.required-imports. But as soon as I override isort.required-imports, other settings under isort section from the parent configuration are lost. I was expecting to only override the sub-setting I specified and inherit the rest.
For reproducing the issue, I have the following tree:
root/
.ruff.toml
subdir/
.ruff.toml
a.py
root/.ruff.toml has
select = ["I"]
[isort]
required-imports = ["from __future__ import annotations"]
forced-separate = ["my_utils"]
root/subdir/.ruff.toml has
extend = "../.ruff.toml"
[isort]
required-imports = []
root/subdir/a.py has
import my_utils
import other_utils
my_utils.a()
other_utils.b()
When I run ruff check --fix **/**, ruff does not split my_utils and other_utils imports, unless I also add forced-separate = ["my_utils"] to root/subdir/.ruff.toml.
(I can also verify this behavior using --show-settings)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
configurationRelated to settings and configurationRelated to settings and configuration