Ask questionsBug: Isort dropping # noqa comment with star import
Python 3.7.5 (running through pre-commit but not sure)
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 https://github.com/PyCQA/isort/issues/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
from typing import * # noqa from typing import IO, BinaryIO, Union # noqa
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!
Answer questions Lothiraldan
Thanks @anirudnits and @timothycrosley for the prompt workaround and prompt fix, you rocks!