Skip to content

Commit 4121c75

Browse files
committed
COMPAT: if docstring_wrapper is activated on a class, don't fail
1 parent 1c106c8 commit 4121c75

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/util/decorators.py

+5
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,11 @@ def __init__(self, func, creator, default=None):
261261
if hasattr(func, attr)])
262262

263263
def __get__(self, instance, cls=None):
264+
265+
# we are called with a class
266+
if instance is None:
267+
return self
268+
264269
# we want to return the actual passed instance
265270
return types.MethodType(self, instance)
266271

0 commit comments

Comments
 (0)