Skip to content

Commit 480c54f

Browse files
committed
MNT: Remove *args for OffsetBox.__init__()
*args were passed on to Artist.__init__(), but Artist does not accept any positional parameters. Passing any positional parameters to Offsetbox would thus have always failed internally. It is thus clearer to not accept any positional parameters for OffsetBox in the first place .
1 parent c11175d commit 480c54f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/offsetbox.py

Lines changed: 3 additions & 3 deletions
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

0 commit comments

Comments
 (0)