Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

error on invalid/unused noqa comments #633

Open
DetachHead opened this issue Feb 20, 2023 · 2 comments
Open

error on invalid/unused noqa comments #633

DetachHead opened this issue Feb 20, 2023 · 2 comments

Comments

@DetachHead
Copy link

DetachHead commented Feb 20, 2023

# 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
    ...
@DetachHead DetachHead changed the title error on invalid noqa comments error on invalid/unused noqa comments May 9, 2023
@KotlinIsland
Copy link

KotlinIsland commented May 9, 2023

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.

@DetachHead
Copy link
Author

it shouldn't be reusing the same ignore comments that other linters use in the first place

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

No branches or pull requests

2 participants