@@ -56,7 +56,7 @@ def __init__(self,
5656
5757 %(Patch)s
5858 """
59- artist . Artist . __init__ (self )
59+ super (). __init__ ()
6060
6161 if linewidth is None :
6262 linewidth = mpl .rcParams ['patch.linewidth' ]
@@ -232,7 +232,7 @@ def contains_points(self, points, radius=None):
232232
233233 def update_from (self , other ):
234234 # docstring inherited.
235- artist . Artist . update_from (self , other )
235+ super (). update_from (other )
236236 # For some properties we don't need or don't want to go through the
237237 # getters/setters, so we just copy them directly.
238238 self ._edgecolor = other ._edgecolor
@@ -644,7 +644,7 @@ def __init__(self, patch, ox, oy, props=None, **kwargs):
644644
645645 %(Patch)s
646646 """
647- Patch .__init__ (self )
647+ super () .__init__ ()
648648 self .patch = patch
649649 # Note: when removing props, we can directly pass kwargs to _update()
650650 # and remove self._props
@@ -683,7 +683,7 @@ def get_patch_transform(self):
683683
684684 def draw (self , renderer ):
685685 self ._update_transform (renderer )
686- Patch .draw (self , renderer )
686+ super () .draw (renderer )
687687
688688
689689class Rectangle (Patch ):
@@ -730,7 +730,7 @@ def __init__(self, xy, width, height, angle=0.0, **kwargs):
730730 %(Patch)s
731731 """
732732
733- Patch .__init__ (self , ** kwargs )
733+ super () .__init__ (** kwargs )
734734
735735 self ._x0 = xy [0 ]
736736 self ._y0 = xy [1 ]
@@ -910,7 +910,7 @@ def __init__(self, xy, numVertices, radius=5, orientation=0,
910910 self ._poly_transform = transforms .Affine2D ()
911911 self ._update_transform ()
912912
913- Patch .__init__ (self , ** kwargs )
913+ super () .__init__ (** kwargs )
914914
915915 def _update_transform (self ):
916916 self ._poly_transform .clear () \
@@ -979,7 +979,7 @@ def __init__(self, path, **kwargs):
979979
980980 %(Patch)s
981981 """
982- Patch .__init__ (self , ** kwargs )
982+ super () .__init__ (** kwargs )
983983 self ._path = path
984984
985985 def get_path (self ):
@@ -1008,7 +1008,7 @@ def __init__(self, xy, closed=True, **kwargs):
10081008
10091009 %(Patch)s
10101010 """
1011- Patch .__init__ (self , ** kwargs )
1011+ super () .__init__ (** kwargs )
10121012 self ._closed = closed
10131013 self .set_xy (xy )
10141014
@@ -1104,7 +1104,7 @@ def __init__(self, center, r, theta1, theta2, width=None, **kwargs):
11041104
11051105 %(Patch)s
11061106 """
1107- Patch .__init__ (self , ** kwargs )
1107+ super () .__init__ (** kwargs )
11081108 self .center = center
11091109 self .r , self .width = r , width
11101110 self .theta1 , self .theta2 = theta1 , theta2
@@ -1356,11 +1356,7 @@ def __init__(self, xy, radius=5,
13561356
13571357 %(Patch)s
13581358 """
1359- RegularPolygon .__init__ (self , xy ,
1360- resolution ,
1361- radius ,
1362- orientation = 0 ,
1363- ** kwargs )
1359+ super ().__init__ (xy , resolution , radius , orientation = 0 , ** kwargs )
13641360
13651361
13661362class Ellipse (Patch ):
@@ -1392,7 +1388,7 @@ def __init__(self, xy, width, height, angle=0, **kwargs):
13921388
13931389 %(Patch)s
13941390 """
1395- Patch .__init__ (self , ** kwargs )
1391+ super () .__init__ (** kwargs )
13961392
13971393 self ._center = xy
13981394 self ._width , self ._height = width , height
@@ -1518,7 +1514,7 @@ def __init__(self, xy, radius=5, **kwargs):
15181514
15191515 %(Patch)s
15201516 """
1521- Ellipse .__init__ (self , xy , radius * 2 , radius * 2 , ** kwargs )
1517+ super () .__init__ (xy , radius * 2 , radius * 2 , ** kwargs )
15221518 self .radius = radius
15231519
15241520 def set_radius (self , radius ):
@@ -1599,7 +1595,7 @@ def __init__(self, xy, width, height, angle=0.0,
15991595 if fill :
16001596 raise ValueError ("Arc objects can not be filled" )
16011597
1602- Ellipse .__init__ (self , xy , width , height , angle , ** kwargs )
1598+ super () .__init__ (xy , width , height , angle , ** kwargs )
16031599
16041600 self .theta1 = theta1
16051601 self .theta2 = theta2
@@ -3614,7 +3610,7 @@ def __init__(self, xy, width, height,
36143610 %(Patch)s
36153611 """
36163612
3617- Patch .__init__ (self , ** kwargs )
3613+ super () .__init__ (** kwargs )
36183614
36193615 self ._x = xy [0 ]
36203616 self ._y = xy [1 ]
@@ -3920,7 +3916,7 @@ def __init__(self, posA=None, posB=None, path=None,
39203916 kwargs .setdefault ("joinstyle" , "round" )
39213917 kwargs .setdefault ("capstyle" , "round" )
39223918
3923- Patch .__init__ (self , ** kwargs )
3919+ super () .__init__ (** kwargs )
39243920
39253921 if posA is not None and posB is not None and path is None :
39263922 self ._posA_posB = [posA , posB ]
@@ -4271,18 +4267,15 @@ def __init__(self, xyA, xyB, coordsA, coordsB=None,
42714267 self .axesA = axesA
42724268 self .axesB = axesB
42734269
4274- FancyArrowPatch .__init__ (self ,
4275- posA = (0 , 0 ), posB = (1 , 1 ),
4276- arrowstyle = arrowstyle ,
4277- connectionstyle = connectionstyle ,
4278- patchA = patchA ,
4279- patchB = patchB ,
4280- shrinkA = shrinkA ,
4281- shrinkB = shrinkB ,
4282- mutation_scale = mutation_scale ,
4283- mutation_aspect = mutation_aspect ,
4284- clip_on = clip_on ,
4285- ** kwargs )
4270+ super ().__init__ (posA = (0 , 0 ), posB = (1 , 1 ),
4271+ arrowstyle = arrowstyle ,
4272+ connectionstyle = connectionstyle ,
4273+ patchA = patchA , patchB = patchB ,
4274+ shrinkA = shrinkA , shrinkB = shrinkB ,
4275+ mutation_scale = mutation_scale ,
4276+ mutation_aspect = mutation_aspect ,
4277+ clip_on = clip_on ,
4278+ ** kwargs )
42864279 self ._dpi_cor = dpi_cor
42874280
42884281 # if True, draw annotation only if self.xy is inside the axes
@@ -4411,4 +4404,4 @@ def draw(self, renderer):
44114404 self ._renderer = renderer
44124405 if not self .get_visible () or not self ._check_xy (renderer ):
44134406 return
4414- FancyArrowPatch .draw (self , renderer )
4407+ super () .draw (renderer )
0 commit comments