Skip to content

isort: skip not working when futures imports are present #2092

Description

@sondrelg

Bug summary

isort: skip seems to not work when there is a futures imports are present.

Reproducible example

Running isort test.py on this example works well. No changes are made.

# test.py
from foo import bar  # isort: skip
from bar import baz

baz + bar

When modifying the file to include a futures import:

from __future__ import annotations

from foo import bar  # isort: skip
from bar import baz

baz + bar

isort now moves the marked import to the bottom.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions