-
-
Notifications
You must be signed in to change notification settings - Fork 605
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
If you have a decorator on the first class or function after imports that has a semicolon in the line (eg, in a string) it confuses the lines_after_imports
setting into only putting a single blank line, when there should in fact be two. Here's a minimal repro:
import pytest
@pytest.mark.skip(';')
def test_thing(): pass
Removing the semicolon in the @pytest.mark.skip(';')
line (eg having it be an empty string) causes it to put two blank lines after imports (as expected here).
This bug causes isort
to conflict with black
(though a workaround is to just put a pass
between the imports and the class or function).
This was tested on latest master at time of writing (1621e19).
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working