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

No error when checking for INP001, but --add-noqa adds directive #2830

Closed
hofrob opened this issue Feb 12, 2023 · 2 comments · Fixed by #2832
Closed

No error when checking for INP001, but --add-noqa adds directive #2830

hofrob opened this issue Feb 12, 2023 · 2 comments · Fixed by #2832
Labels
bug Something isn't working

Comments

@hofrob
Copy link

hofrob commented Feb 12, 2023

Python package:

foo/__init__.py
foo/bar.py  # empty

Contents of __init__.py:

from foo import bar

Executing ruff check -n --isolated --select INP001 foo/ does not show any error messages. But ruff check -n --isolated --select INP001 --add-noqa foo/ adds a noqa directive.

Contents of __init__.py after --add-noqa:

from foo import bar  # noqa: INP001

I don't think there's anything wrong with the code, so --add-noqa should not add any directives (in my opinion).

$ ruff --version
ruff 0.0.245
$ python --version
Python 3.11.2

🏈

@charliermarsh
Copy link
Member

Oh very weird!

@charliermarsh charliermarsh added the bug Something isn't working label Feb 12, 2023
@charliermarsh
Copy link
Member

Ahhh right, there was a TODO to thread through the package here. Will fix...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants