Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2f75888

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

File tree

2 files changed

+4
-4
lines changed
Filter options

2 files changed

+4
-4
lines changed

‎lib/matplotlib/offsetbox.py

Copy file name to clipboardExpand all lines: lib/matplotlib/offsetbox.py
+3-3Lines 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

‎lib/matplotlib/offsetbox.pyi

Copy file name to clipboardExpand all lines: lib/matplotlib/offsetbox.pyi
+1-1Lines changed: 1 addition & 1 deletion
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.