Skip to content

Commit b57a331

Browse files
author
Alan
committed
Use super pattern in Canvas__init__ for better consistency.
1 parent 4ae3a55 commit b57a331

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

ipympl/backend_nbagg.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,8 @@ class Canvas(DOMWidget, FigureCanvasWebAggCore):
238238
# Static as it should be the same for all canvases
239239
current_dpi_ratio = 1.0
240240

241-
def __init__(self, figure, *args, **kwargs):
242-
DOMWidget.__init__(self, *args, **kwargs)
243-
FigureCanvasWebAggCore.__init__(self, figure, *args, **kwargs)
241+
def __init__(self, figure, **kwargs):
242+
super().__init__(figure=figure, **kwargs)
244243

245244
self.on_msg(self._handle_message)
246245

0 commit comments

Comments
 (0)