Replies: 2 comments 3 replies
-
|
Can you try disabling |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
Just for completeness: This is the same issue reported in #12984 and the fix waits to be merged in #12987. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
At our company, we have all our packages in the same namespace (let's assume
foo). The packages each contain one module and are developed in separate repos (let's call thembarandbaz).When using stuff from
foo.bazinsidefoo.bar, all imports fromfoo.bazwere sorted into the third-party category by isort. Which makes sense in our context, as those are libraries we consider third-party in the current package because they are developed elsewhere.Now, we want to let ruff do the import sorting and it sorts everything in the
foonamespace to first-party.In our repo the code lives in
src/foo/bar, withfoobeing a namespace package (no__init__.py).I fiddled with all the different ruff config parameters but could not find the right combination to behave like isort does.
This came closest to the desired result:
But the above solution requires us that we list ALL our packages explicitly as third-party which is not feasible.
Instead, ruff should treat everything in
src/foo/baras first-party, and everything else in thefoonamespace as third-party.Could anyone help me finding the right configuration?
Beta Was this translation helpful? Give feedback.
All reactions