PyCQA / isort

A Python utility / library to sort imports.
https://pycqa.github.io/isort/
MIT License
6.53k stars 583 forks source link

Bug : isort add empty lines before pylint comments #2260

Open LLyaudet opened 7 months ago

LLyaudet commented 7 months ago

Hello,

Below you will find an extract of my terminal where I used @redacted@ each time I replaced a consecutive substring at the same position.

$ isort --version

                 _                 _
                (_) ___  ___  _ __| |_
                | |/ _/ / _ \/ '__  _/
                | |\__ \/\_\/| |  | |_
                |_|\___/\___/\_/   \_/

      isort your imports, so you don't have to.

                    VERSION 5.13.2

@redacted@$ cat test_isort.py 
# pylint: disable-next=import-error
from django.conf import settings
# pylint: disable-next=import-error
from django.core.cache import cache, caches
# pylint: disable-next=import-error
from django.test import TestCase
@redacted@$ isort test_isort.py 
Fixing /@redacted@/test_isort.py
@redacted@$ cat test_isort.py 
# pylint: disable-next=import-error
from django.conf import settings

# pylint: disable-next=import-error
from django.core.cache import cache, caches

# pylint: disable-next=import-error
from django.test import TestCase

I saw a similar issue, but not the same issue, here: https://github.com/PyCQA/isort/issues/1322 But it has already been solved

Best regards, Laurent Lyaudet