Skip to content

Commit 2f75888

Browse files
authored
Merge pull request #29386 from timhoffm/remove-offestbox-args
MNT: Remove *args for OffsetBox.__init__()
2 parents c11175d + c855d76 commit 2f75888

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/matplotlib/offsetbox.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,10 @@ class OffsetBox(martist.Artist):
206206
The child artists are meant to be drawn at a relative position to its
207207
parent.
208208
209-
Being an artist itself, all parameters are passed on to `.Artist`.
209+
Being an artist itself, all keyword arguments are passed on to `.Artist`.
210210
"""
211-
def __init__(self, *args, **kwargs):
212-
super().__init__(*args)
211+
def __init__(self, **kwargs):
212+
super().__init__()
213213
self._internal_update(kwargs)
214214
# Clipping has not been implemented in the OffsetBox family, so
215215
# disable the clip flag for consistency. It can always be turned back

lib/matplotlib/offsetbox.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def _get_packed_offsets(
2626
class OffsetBox(martist.Artist):
2727
width: float | None
2828
height: float | None
29-
def __init__(self, *args, **kwargs) -> None: ...
29+
def __init__(self, **kwargs) -> None: ...
3030
def set_figure(self, fig: Figure | SubFigure) -> None: ...
3131
def set_offset(
3232
self,

0 commit comments

Comments
 (0)