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

isort does not respect # pylint: disable-next #2054

Open
labrys opened this issue Dec 19, 2022 · 1 comment
Open

isort does not respect # pylint: disable-next #2054

labrys opened this issue Dec 19, 2022 · 1 comment

Comments

@labrys
Copy link

labrys commented Dec 19, 2022

Given an import section as follow:

    # pylint: disable-next=no-name-in-module
    from C import D
    # pylint: disable-next=no-name-in-module
    from A import B

isort will reorder them as follows, breaking the pylint disable

    # pylint: disable-next=no-name-in-module
    # pylint: disable-next=no-name-in-module
    from A import B
    from C import D
@labrys labrys changed the title isort does not respect # pylint: disable-next isort does not respect # pylint: disable-next Dec 19, 2022
@djcopley
Copy link

Running into the same issue in a slightly different circumstance.

I have

# pylint: disable=cyclic-import
import a
import b
from blah import foo
# pylint: enable=cyclic-import

isort adds a newline after the last import

# pylint: disable=cyclic-import
import a
import b
from blah import foo

# pylint: enable=cyclic-import

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

2 participants