-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething isn't workingSomething isn't workingisortRelated to import sortingRelated to import sorting
Description
Given this config:
[tool.isort]
force_to_top = ["typing"]
force_sort_within_sections = true
[tool.ruff]
select = ["I001"]
[tool.ruff.isort]
force-to-top = ["typing"]
force-sort-within-sections = trueand this isort-clean file:
from typing import Any
import abc
from abc import ABCMeta
import osruff fix gives:
import abc
import os
from typing import Any
from abc import ABCMetaIt looks like force-sort-within-sections (which says to not sort the imports and froms separately) is ignored. But if I comment out the force-to-top = ["typing"] setting, ruff gives:
import abc
from abc import ABCMeta
import os
from typing import Anywhich is correct. So I'm guessing the two settings together cause the issue.
(I'll try to fix this issue when I get a chance, unless someone beats me to it)
Version: ruff 0.0.257
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingisortRelated to import sortingRelated to import sorting