deadcode icon indicating copy to clipboard operation
deadcode copied to clipboard

noqa doesn't work for decorated functions

Open bra-fsn opened this issue 2 years ago • 0 comments

With an unused function, this works:

def check(arg):  # noqa: DC002
    pass

but this doesn't:

@cache
def check(arg):  # noqa: DC002
    pass

This works again, but I don't think it should be valid:

@cache  # noqa: DC002
def check(arg):
    pass

Adding more decorators yields an error again.

bra-fsn avatar Jan 17 '24 15:01 bra-fsn