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

Skip to content

Commit 08b62e5

Browse files
committed
Fix deprecated wrapping of class __init__.
The docstring is lost otherwise.
1 parent 6b8725f commit 08b62e5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/cbook/deprecation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def finalize(wrapper, new_doc):
180180
obj.__doc__ = new_doc
181181
except AttributeError: # Can't set on some extension objects.
182182
pass
183-
obj.__init__ = wrapper
183+
obj.__init__ = functools.wraps(obj.__init__)(wrapper)
184184
return obj
185185

186186
elif isinstance(obj, property):

0 commit comments

Comments
 (0)