Skip to content

Commit 367bd2b

Browse files
timhoffmmeeseeksmachine
authored andcommitted
Backport PR #17587: Add a docstring to toolkit's BezierPath.__init__.
1 parent bd6fc99 commit 367bd2b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

lib/matplotlib/cbook/deprecation.py

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

190190
elif isinstance(obj, property):

lib/mpl_toolkits/axisartist/axis_artist.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@
110110
class BezierPath(Line2D):
111111

112112
def __init__(self, path, *args, **kwargs):
113+
"""
114+
Parameters
115+
----------
116+
path : `~.path.Path`
117+
The path to draw.
118+
**kwargs
119+
All remaining keyword arguments are passed to `.Line2D`.
120+
"""
113121
Line2D.__init__(self, [], [], *args, **kwargs)
114122
self._path = path
115123
self._invalid = False

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