deadcode
deadcode copied to clipboard
noqa doesn't work for decorated functions
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.