Skip to content

Commit 3855452

Browse files
committed
Add super __init__ calls to all MathtextBackend.
These probably worked fine due to using `set_canvas_size` before `get_results`, or something that would set the remaining attributes.
1 parent 696929f commit 3855452

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/matplotlib/mathtext.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ class MathtextBackendPs(MathtextBackend):
189189
"_PSResult", "width height depth pswriter used_characters")
190190

191191
def __init__(self):
192+
super().__init__()
192193
self.pswriter = StringIO()
193194
self.lastfont = None
194195

@@ -230,6 +231,7 @@ class MathtextBackendPdf(MathtextBackend):
230231
"_PDFResult", "width height depth glyphs rects used_characters")
231232

232233
def __init__(self):
234+
super().__init__()
233235
self.glyphs = []
234236
self.rects = []
235237

@@ -260,6 +262,7 @@ class MathtextBackendSvg(MathtextBackend):
260262
backend.
261263
"""
262264
def __init__(self):
265+
super().__init__()
263266
self.svg_glyphs = []
264267
self.svg_rects = []
265268

@@ -293,6 +296,7 @@ class MathtextBackendPath(MathtextBackend):
293296
_Result = namedtuple("_Result", "width height depth glyphs rects")
294297

295298
def __init__(self):
299+
super().__init__()
296300
self.glyphs = []
297301
self.rects = []
298302

@@ -320,6 +324,7 @@ class MathtextBackendCairo(MathtextBackend):
320324
"""
321325

322326
def __init__(self):
327+
super().__init__()
323328
self.glyphs = []
324329
self.rects = []
325330

0 commit comments

Comments
 (0)