8000 Fix deprecated wrapping of class __init__. · matplotlib/matplotlib@08b62e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 08b62e5

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)
0