Skip to content

isort removes newlines before standalone comments if the following line is an import of the same group #251

@gaborbernat

Description

@gaborbernat

Operating system: Arch Linux
Python version: Python 3.6.6
Black version: 18.5b0
Does also happen on master: yes

Given:

import a
# noinspection PyProtectedMember
import _a

Black formats this to (note the introduced empty line):

import a
# noinspection PyProtectedMember

import _a

However isort correctly (in the recommended mode 3) formats it to:

import a
# noinspection PyProtectedMember
import _a

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions