pydocstyle
pydocstyle copied to clipboard
error on invalid/unused `noqa` comments
# should be an error, invalid code
def foo(): # noqa: asdf
...
# should be an error, noqa comment has no effect
def bar(): # noqa: D103
"""asdf"""
# should be an error, a space is required after the colon, so this just ignores all errors not just D103
def baz(): # noqa:D103
...
But my package 'pyasdfstyle' would have reported an error on the first function foo:
Function not named 'asdf' [asdf]
There would be no way to differentiate between the errors for pydocstyle and the errors for pyasdfstyle.
it shouldn't be reusing the same ignore comments that other linters use in the first place