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

Allow ignoring T000 (TODO marker) #29

Closed
PeterJCLaw opened this issue Sep 2, 2023 · 2 comments
Closed

Allow ignoring T000 (TODO marker) #29

PeterJCLaw opened this issue Sep 2, 2023 · 2 comments

Comments

@PeterJCLaw
Copy link

Given the following code:

# TODO: make this better # noqa: T000

When running flake8 with flake8-noqa and flake8-todo both installed the user is stuck having either the T000 warning about the TODO or the NQA102. I'm guessing this is related to the behaviour previously partially discussed in #26, though slightly different.

I've tried putting the noqa comment both before and after the TODO comment, neither of those works.

@plinss
Copy link
Owner

plinss commented Sep 2, 2023

This is an issue in flake8-todo, specifically these lines need to be simply removed. (And the pycodestyle import and dependency in setup.py can be removed too.)

flake8-todo is checking for the existence of a #noqa comment and not reporting the violation if present. This is an anti-pattern. flake8-todo should simply report the violation and let flake8 filter out the #noqa.

Please file an issue on flake8-todo.

@PeterJCLaw
Copy link
Author

Aha, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants