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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy