Open
Description
class A:
@deprecate_nonkeyword_arguments(version=None, allowed_args=["self"])
def method(self, deprecated_positional=None): ...
class B(A): ...
B().method(1) # will warn about `A.method`
Might be nice to warn about B.method
#48592 (comment)
Could probably use something like args[0].__class__.__name__
inside the decorator but that assumes that the decorated object is a method and not a function.