Skip to content

Commit c43593a

Browse files
committed
Update for api changes since mypy branch was started
1 parent 9c300a9 commit c43593a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/matplotlib/figure.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class FigureBase(Artist):
122122

123123
# Any in list of list is recursive list[list[Hashable | list[Hashable | ...]]] but that can't really be type checked
124124
# TODO: add per_subplot_kw
125-
def subplot_mosaic(self, mosaic: str | list[list[Any]], *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: Any = ..., subplot_kw: dict[str, Any] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> dict[Any, Axes]: ...
125+
def subplot_mosaic(self, mosaic: str | list[list[Any]], *, sharex: bool = ..., sharey: bool = ..., width_ratios: ArrayLike | None = ..., height_ratios: ArrayLike | None = ..., empty_sentinel: Any = ..., subplot_kw: dict[str, Any] | None = ..., per_subplot_kw: dict[Any, dict[str, Any]] | None = ..., gridspec_kw: dict[str, Any] | None = ...) -> dict[Any, Axes]: ...
126126

127127
class SubFigure(FigureBase):
128128
figure: FigureBase

lib/matplotlib/legend.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class Legend(Artist):
4545
axes: Axes
4646
parent: Axes | Figure
4747
legendPatch: FancyBboxPatch
48-
def __init__(self, parent: Axes | Figure, handles: Iterable[Artist], labels: Iterable[str], loc: str | tuple[float, float] | int | None = ..., numpoints: int | None = ..., markerscale: float | None = ..., markerfirst: bool = ..., scatterpoints: int | None = ..., scatteryoffsets: Iterable[float] | None = ..., prop: FontProperties | dict[str, Any] | None = ..., fontsize: float | str | None = ..., labelcolor: Color | Iterable[Color] | Literal["linecolor", "markerfacecolor", "mfc", "markeredgecolor", "mec"] | None = ..., borderpad: float | None = ..., labelspacing: float | None = ..., handlelength: float | None = ..., handleheight: float | None = ..., handletextpad: float | None = ..., borderaxespad: float | None = ..., columnspacing: float | None = ..., ncols: int = ..., mode: Literal["expand"] | None = ..., fancybox: bool | None = ..., shadow: bool | None = ..., title: str | None = ..., title_fontsize: float | None = ..., framealpha: float | None = ..., edgecolor: Literal["inherit"] | Color | None = ..., facecolor: Literal["inherit"] | Color | None = ..., bbox_to_anchor: BboxBase | tuple[float, float] | tuple[float, float, float, float] | None = ..., bbox_transform: Transform | None = ..., frameon: bool | None = ..., handler_map: dict[Artist | Type, HandlerBase] | None = ..., title_fontproperties: FontProperties | dict[str, Any] | None = ..., alignment: Literal["center", "left", "right"] = ..., *, ncol: int = ..., draggable: bool = ...) -> None: ...
48+
def __init__(self, parent: Axes | Figure, handles: Iterable[Artist], labels: Iterable[str], loc: str | tuple[float, float] | int | None = ..., numpoints: int | None = ..., markerscale: float | None = ..., markerfirst: bool = ..., reverse: bool = ..., scatterpoints: int | None = ..., scatteryoffsets: Iterable[float] | None = ..., prop: FontProperties | dict[str, Any] | None = ..., fontsize: float | str | None = ..., labelcolor: Color | Iterable[Color] | Literal["linecolor", "markerfacecolor", "mfc", "markeredgecolor", "mec"] | None = ..., borderpad: float | None = ..., labelspacing: float | None = ..., handlelength: float | None = ..., handleheight: float | None = ..., handletextpad: float | None = ..., borderaxespad: float | None = ..., columnspacing: float | None = ..., ncols: int = ..., mode: Literal["expand"] | None = ..., fancybox: bool | None = ..., shadow: bool | None = ..., title: str | None = ..., title_fontsize: float | None = ..., framealpha: float | None = ..., edgecolor: Literal["inherit"] | Color | None = ..., facecolor: Literal["inherit"] | Color | None = ..., bbox_to_anchor: BboxBase | tuple[float, float] | tuple[float, float, float, float] | None = ..., bbox_transform: Transform | None = ..., frameon: bool | None = ..., handler_map: dict[Artist | Type, HandlerBase] | None = ..., title_fontproperties: FontProperties | dict[str, Any] | None = ..., alignment: Literal["center", "left", "right"] = ..., *, ncol: int = ..., draggable: bool = ...) -> None: ...
4949
def set_ncols(self, ncols: int) -> None: ...
5050
@classmethod
5151
def get_default_handler_map(cls) -> dict[Type, HandlerBase]: ...

lib/matplotlib/widgets.pyi

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Button(AxesWidget):
4343
label: Text
4444
color: Color
4545
hovercolor: Color
46-
def __init__(self, ax: Axes, label: str, image: ArrayLike | PIL.Image.Image | None = ..., color: Color = ..., hovercolor: Color = ...) -> None: ...
46+
def __init__(self, ax: Axes, label: str, image: ArrayLike | PIL.Image.Image | None = ..., color: Color = ..., hovercolor: Color = ..., *, useblit: bool = ...) -> None: ...
4747
def on_clicked(self, func: Callable[[Event], Any]): ...
4848
def disconnect(self, cid: int) -> None: ...
4949

@@ -92,7 +92,7 @@ class CheckButtons(AxesWidget):
9292
labels: list[Text]
9393
lines: list[tuple[Line2D, Line2D]]
9494
rectangles: list[Rectangle]
95-
def __init__(self, ax: Axes, labels: Sequence[str], actives: Iterable[bool] | None = ...) -> None: ...
95+
def __init__(self, ax: Axes, labels: Sequence[str], actives: Iterable[bool] | None = ..., *, useblit: bool = ...) -> None: ...
9696
def set_active(self, index: int) -> None: ...
9797
def get_status(self) -> list[bool]: ...
9898
def on_clicked(self, func: Callable[[str], Any]) -> int: ...

0 commit comments

Comments
 (0)