Skip to content
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

Bug where noqa or unimport:skip is ignored #146

Closed
jgillard opened this issue Nov 11, 2020 · 1 comment · Fixed by #147
Closed

Bug where noqa or unimport:skip is ignored #146

jgillard opened this issue Nov 11, 2020 · 1 comment · Fixed by #147
Assignees
Labels
bug Something isn't working changelog Changes should be written to the changelog file.

Comments

@jgillard
Copy link

jgillard commented Nov 11, 2020

I've found an issue with # noqa and # unimport:skip handling with v0.6.6. I don't get this issue with v0.3.0.

The snippet below works as expected:

import math
import collections  # noqa
--- foo.py

+++ 

@@ -1,2 +1 @@

-import math
 import collections  # noqa

As soon as a newline is introduced between those two imports then the diff changes incorrectly:

import math

import collections  # noqa
--- foo.py

+++ 

@@ -1,3 +1 @@

-import math
 
-import collections  # noqa
@hakancelikdev hakancelikdev added bug Something isn't working changelog Changes should be written to the changelog file. needs test labels Nov 11, 2020
@hakancelikdev
Copy link
Owner

Hi, thank you!

This bug only exists in python3.8, I'll fix it soon.

@hakancelikdev hakancelikdev self-assigned this Nov 12, 2020
hakancelikdev added a commit that referenced this issue Nov 12, 2020
@hakancelikdev hakancelikdev linked a pull request Nov 12, 2020 that will close this issue
hakancelikdev added a commit that referenced this issue Nov 12, 2020
hakancelikdev added a commit that referenced this issue Jul 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working changelog Changes should be written to the changelog file.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants