New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lines with a NOQA comment is grouped separately with 5.0.4 #1279
Comments
+1 to this . Facing the same issue |
My observation is the NOQA directive under isort is case-sensitive, and inappropriately clashes with flake8. In @ljodal's example, I'd be happy to PR this myself, but changing pragma's seems like something left to someone more knowledgeable.
|
My initial inclination is to just remove the NOQA functionality from isort, curious what others thoughts are on this? isort has its own comments to handle skipping, etc - and using or abiding by overloaded ones seems likely to lead to ongoing confusion. Especially since isort is a formatter firstly, and a quality assurance tool second. |
I must admit that I don't have a clear view of what the NOQA support in isort is supposed to do, but we're mostly using it to silence flake8 warnings for unused imports (for stuff that have side effects or for stringly typed stuff). I'd still like those imports to be sorted along with the rest (just like they were pre isort 5) :) |
The latest release restores the old behaviour while allowing noqa comments to optionally be utilized for those that want that behaviour via an |
Looks good in our codebase now, thanks for the quick fix! |
Hi, I'm just testing version 5.0.4 with the
black
profile on one of the code bases where we use Isort. I see that it groups lines with aNOQA
comment separately from other imports, but not lines with a lower casenoqa
comment. These changes also appear to only apply to top-level imports. Is this intentional?I expected the noqa-lines to be sorted together with the rest of the imports from the same module. Running on Python 3.7.5. Let me know if you need anything more from me :)
The text was updated successfully, but these errors were encountered: