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

+1-1
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

+8
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)