-
Notifications
You must be signed in to change notification settings - Fork 2k
isort options for profile compatibility #24323
Copy link
Copy link
Open
Labels
isortRelated to import sortingRelated to import sortingneeds-designNeeds further design before implementationNeeds further design before implementation
Description
Discussed in #24315
Originally posted by tonycoco March 30, 2026
Since my attempt at a single config option addition to the isort capabilities here #24313 was closed, I wanted to discuss adding isort's lexicographical config option to ruff. As stated in an original PR (#22572) to bring ruff to parity with isort's profile options, I'm trying to move a few open-source Google repos to use ruff and this would be a helpful option to switch. A fully "google" profile compatible config for ruff would look something like:
[tool.ruff.lint.isort]
lexicographical = true # Not yet implemented
line-length = 1000 # Not yet implemented
group-by-package = true # Not yet implemented
force-single-line = true
force-sort-within-sections = true
single-line-exclusions = [
"collections.abc",
"six.moves",
"typing",
"typing-extensions"
]
order-by-type = false
A potential PR is working here to tackle the lexicographical option: https://github.com/tonycoco/ruff/tree/isort-lexicographical and I'm happy to re-open and share more.
Related to #3119
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
isortRelated to import sortingRelated to import sortingneeds-designNeeds further design before implementationNeeds further design before implementation