You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: 5.8.0
Python 3.7.5 (running through pre-commit but not sure) Description
Isort drops # noqa comment while sorting, when two imports from the same file/module exists, and one of them is a star import. I think it might be related to #1594 but I preferred opening a new bug if that's not the case.
Steps to reproduce
Create one file with content as below. Sort test.py with isort
test.py
from typing import * # noqa
from typing import IO, BinaryIO, Union # noqa
Actual result:
from typing import * # noqa
from typing import IO, BinaryIO, Union
As you can see, #noqa comment was dropped from the second line, resulting in linter failling.
Expected result:
Imports should be kept as is, both # noqa comments should be kept as well.
Thank you for your amazing work!
The text was updated successfully, but these errors were encountered:
@anirudnits's advice is good for fixing this on the current latest version of isort on PyPI, and the bug itself is now fixed in develop and will be pushed to PyPI some time this month.
Version:
5.8.0
Python 3.7.5 (running through pre-commit but not sure)
Description
Isort drops # noqa comment while sorting, when two imports from the same file/module exists, and one of them is a star import. I think it might be related to #1594 but I preferred opening a new bug if that's not the case.
Steps to reproduce
Create one file with content as below. Sort
test.py
with isorttest.py
Actual result:
As you can see, #noqa comment was dropped from the second line, resulting in linter failling.
Expected result:
Imports should be kept as is, both # noqa comments should be kept as well.
Thank you for your amazing work!
The text was updated successfully, but these errors were encountered: