Skip to content

MNT: Remove *args for OffsetBox.__init__() #29386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/matplotlib/offsetbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/offsetbox.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading