Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False order of local imports relative to standard library imports #2257

Open
JohnBioinf opened this issue Apr 16, 2024 · 0 comments
Open

False order of local imports relative to standard library imports #2257

JohnBioinf opened this issue Apr 16, 2024 · 0 comments

Comments

@JohnBioinf
Copy link

I am using the isort library to automatically sort my Python imports, but I'm experiencing an issue with the ordering of the imports. Specifically, isort is grouping my local imports (e.g., from test.my_module import MyClass) with the standard library imports (e.g., import os) instead of with the other local imports (e.g., from my_app.my_module import MyOtherClass).

For example, the current ordering produced by isort is:

import os
from test.my_module import MyClass

from flask import Flask

from my_app.my_module import MyOtherClass

But as far as I understand the order should be like so:

import os

from flask import Flask

from my_app.my_module import MyOtherClass
from test.my_module import MyClass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant