Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d00767

Browse files
committed
MNT: use built-in logic for unwrapping
1 parent 1c9feb8 commit 1d00767

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

boilerplate.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,7 @@ def format_value(value):
212212
# Get argspec of wrapped function
213213
base_func = getattr(Axes, func)
214214
has_data = 'data' in inspect.signature(base_func).parameters
215-
if hasattr(base_func, '__wrapped__'):
216-
work_func = base_func.__wrapped__
217-
else:
218-
work_func = base_func
215+
work_func = inspect.unwrap(base_func)
219216

220217
args, varargs, varkw, defaults = inspect.getargspec(work_func)
221218

0 commit comments

Comments
 (0)