ENH: return current class name in deprecate_nonkeyword_arguments

This issue has been tracked since 2022-09-20.
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.

More Details About Repo
Owner Name pandas-dev
Repo Name pandas
Full Name pandas-dev/pandas
Language Python
Created Date 2010-08-24
Updated Date 2022-10-04
Star Count 35430
Watcher Count 1120
Fork Count 15089
Issue Count 3589

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date