Skip to content

Commit e4369ca

Browse files
committed
fix function signature
1 parent 245d4b0 commit e4369ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas_flavor/register.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from functools import wraps
12
from .pandas_internals import (register_series_accessor,
23
register_dataframe_accessor)
34

@@ -18,11 +19,12 @@ def print_column(df, col):
1819
def inner(*args, **kwargs):
1920

2021
class AccessorMethod(object):
21-
__doc__ = method.__doc__
22+
2223

2324
def __init__(self, pandas_obj):
2425
self._obj = pandas_obj
2526

27+
@wraps(method)
2628
def __call__(self, *args, **kwargs):
2729
return method(self._obj, *args, **kwargs)
2830

@@ -42,6 +44,7 @@ class AccessorMethod(object):
4244
def __init__(self, pandas_obj):
4345
self._obj = pandas_obj
4446

47+
@wraps(method)
4548
def __call__(self, *args, **kwargs):
4649
return method(self._obj, *args, **kwargs)
4750

0 commit comments

Comments
 (0)