From 6b8725f68d6513865191da02df86bd8c4511a1d5 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 8 Jun 2020 15:44:18 -0400 Subject: [PATCH 1/2] Add a docstring to toolkit's BezierPath.__init__. This breaks on new Sphinx due to missing the docstring for the inherited methods that the superclass docstring references, but this method doesn't need it. --- lib/mpl_toolkits/axisartist/axis_artist.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/mpl_toolkits/axisartist/axis_artist.py b/lib/mpl_toolkits/axisartist/axis_artist.py index c127ff5a740d..21b2a9042263 100644 --- a/lib/mpl_toolkits/axisartist/axis_artist.py +++ b/lib/mpl_toolkits/axisartist/axis_artist.py @@ -108,6 +108,14 @@ class BezierPath(Line2D): def __init__(self, path, *args, **kwargs): + """ + Parameters + ---------- + path : `~.path.Path` + The path to draw. + **kwargs + All remaining keyword arguments are passed to `.Line2D`. + """ Line2D.__init__(self, [], [], *args, **kwargs) self._path = path self._invalid = False From 08b62e58032ce9f52e7ac5a8401a92950033bb23 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 8 Jun 2020 16:57:15 -0400 Subject: [PATCH 2/2] Fix deprecated wrapping of class __init__. The docstring is lost otherwise. --- lib/matplotlib/cbook/deprecation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/cbook/deprecation.py b/lib/matplotlib/cbook/deprecation.py index bdb98eb6a39a..955d7c3d9e3c 100644 --- a/lib/matplotlib/cbook/deprecation.py +++ b/lib/matplotlib/cbook/deprecation.py @@ -180,7 +180,7 @@ def finalize(wrapper, new_doc): obj.__doc__ = new_doc except AttributeError: # Can't set on some extension objects. pass - obj.__init__ = wrapper + obj.__init__ = functools.wraps(obj.__init__)(wrapper) return obj elif isinstance(obj, property): 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