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

PGH004 (blanket-noqa) doesn't checks file-level pragmas #11454

Open
ashrub-holvi opened this issue May 17, 2024 · 1 comment · May be fixed by #11540
Open

PGH004 (blanket-noqa) doesn't checks file-level pragmas #11454

ashrub-holvi opened this issue May 17, 2024 · 1 comment · May be fixed by #11540
Labels
help wanted Contributions especially welcome rule Implementing or modifying a lint rule

Comments

@ashrub-holvi
Copy link

Hi,

If blanket noqa is used on a file level, cat test.py:

# ruff: noqa

print("Hello Astral!")

ruff will not complain about it:

ruff check --select=PGH004 test.py
All checks passed!

but probably it should, because in any case better to disable exact rules, not everything.
Same for # flake8: noqa which is also supported by ruff.

ruff --version
ruff 0.4.4
@charliermarsh charliermarsh added the rule Implementing or modifying a lint rule label May 17, 2024
@charliermarsh
Copy link
Member

Seems reasonable to me? May need to be added in preview since it's an increase in the scope of the rule.

@zanieb zanieb added the help wanted Contributions especially welcome label May 18, 2024
@ajesipow ajesipow linked a pull request May 25, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contributions especially welcome rule Implementing or modifying a lint rule
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants