Open JonathanPlasse opened 1 year ago
We have NQA101
, NQA102
, and NQA103
as RUF100
, but it'd be great to have better diagnostics around noqa validation.
NQA001
seems covered by E262
I'm gonna work on NQA002
, NQA003
, NQA004
, and NQA005
.
The functionality of NQA002
and NQA003
was added to PGH004
The functionality of NQA005
was added to RUF100
FYI @JonathanPlasse NQA001
and NQA005
should be checked in the summary, but NQA004
should be unchecked for now.
Okay, I think I corrected them.
flake8-noqa
Error codes
NQA001
"#noqa" must have a single space after the hash, e.g. "# noqa"NQA002
"# noqa X000" must have a colon, e.g. "# noqa: X000"NQA003
"# noqa : X000" must not have a space before the colon, e.g. "# noqa: X000"'NQA004
"# noqa: X000" must have at most one space before the codes, e.g. "# noqa: X000"NQA005
"# noqa: X000, X000" has duplicate codes, remove X000NQA101
"# noqa" has no violationsNQA102
"# noqa: X000" has no matching violationsNQA103
asRUF100
"# noqa: X000, X001" has unmatched code(s), remove X001NQA104
asPGH004
"# noqa" must have codes, e.g. "# noqa: X000" (enable via noqa-require-code)Flake8 specific rules
Should we ignore them?
NQA011
"#flake8: noqa" must have a single space after the hash, e.g. "# flake8: noqa"NQA012
"# flake8 noqa" must have a colon or equals, e.g. "# flake8: noqa"NQA013
"# flake8 : noqa" must not have a space before the colon, e.g. "# flake8: noqa"Options
noqa-require-code
asPGH004
: Require code(s) to be included in # noqa commentsnoqa-no-require-code
: Do not require code(s) in # noqa comments (default setting)noqa-include-name
: Include plugin name in messagesnoqa-no-include-name
: Do not include plugin name in messages (default setting)