diff --git a/lib/matplotlib/offsetbox.py b/lib/matplotlib/offsetbox.py index 91858c23ad62..af554c69bc02 100644 --- a/lib/matplotlib/offsetbox.py +++ b/lib/matplotlib/offsetbox.py @@ -206,10 +206,10 @@ class OffsetBox(martist.Artist): The child artists are meant to be drawn at a relative position to its parent. - Being an artist itself, all parameters are passed on to `.Artist`. + Being an artist itself, all keyword arguments are passed on to `.Artist`. """ - def __init__(self, *args, **kwargs): - super().__init__(*args) + def __init__(self, **kwargs): + super().__init__() self._internal_update(kwargs) # Clipping has not been implemented in the OffsetBox family, so # disable the clip flag for consistency. It can always be turned back diff --git a/lib/matplotlib/offsetbox.pyi b/lib/matplotlib/offsetbox.pyi index 3b1520e17138..8a2016c0320a 100644 --- a/lib/matplotlib/offsetbox.pyi +++ b/lib/matplotlib/offsetbox.pyi @@ -26,7 +26,7 @@ def _get_packed_offsets( class OffsetBox(martist.Artist): width: float | None height: float | None - def __init__(self, *args, **kwargs) -> None: ... + def __init__(self, **kwargs) -> None: ... def set_figure(self, fig: Figure | SubFigure) -> None: ... def set_offset( self,