Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 983c1fc

Browse files
committed
Use super() in text-related classes.
1 parent 0a83b9c commit 983c1fc

File tree

5 files changed

+52
-52
lines changed

5 files changed

+52
-52
lines changed

doc/devel/contributing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ function is a simple pass-through to
409409

410410
# in pylab.py
411411
def text(*args, **kwargs):
412-
ret = gca().text(*args, **kwargs)
412+
ret = gca().text(*args, **kwargs)
413413
draw_if_interactive()
414414
return ret
415415

@@ -427,7 +427,7 @@ illustration) just passes them on to the
427427

428428
# in text.py
429429
def __init__(self, x=0, y=0, text='', **kwargs):
430-
Artist.__init__(self)
430+
super().__init__()
431431
self.update(kwargs)
432432

433433
``update`` does the work looking for methods named like

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class ClabelText(text.Text):
4242

4343
def get_rotation(self):
4444
new_angle, = self.get_transform().transform_angles(
45-
[text.Text.get_rotation(self)], [self.get_position()])
45+
[super().get_rotation()], [self.get_position()])
4646
return new_angle
4747

4848

lib/matplotlib/dviread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ class Vf(Dvi):
629629
"""
630630

631631
def __init__(self, filename):
632-
Dvi.__init__(self, filename, 0)
632+
super().__init__(filename, 0)
633633
try:
634634
self._first_font = None
635635
self._chars = {}

0 commit comments

Comments
 (0)