Import sorting across monorepo with nest subsorting #23073
Unanswered
leverage-analytics
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
@dylwil3 may have a better suggestion, but I think the best you can do is to include [lint.isort.sections]
pkg_1 = ["src.pkg_1"]
pkg_2 = ["src.pkg_2"]
[lint.isort]
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder",
"pkg_1",
"pkg_2",
]but that might be what you meant about listing them all in your configuration. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Let's say I have a monorepo with multiple subpackages. Each subpackage has the same structure with
barandfoosubdirectories.Is it possible to sort imports so that we sort consistently (
foo-bar) in each subpackage without having to list each subpackage in the configuration while also sorting each subpackage separately?The source directory might be something like this:
Is there a way to produce this outcome regardless of the subpackage(s) imported without having to list every combination in the configuration?
Note that in the desired outcome:
pkgfoois imported BEFOREbar)Any help is appreciated!
Beta Was this translation helpful? Give feedback.
All reactions