Skip to content

Commit 23adb36

Browse files
committed
Simplify the stub
1 parent 613a8e8 commit 23adb36

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

lib/matplotlib/figure.pyi

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -92,34 +92,6 @@ class FigureBase(Artist):
9292
@overload
9393
def add_subplot(self, **kwargs) -> Axes: ...
9494
@overload
95-
def subplots(
96-
self,
97-
nrows: Literal[1] = ...,
98-
ncols: Literal[1] = ...,
99-
*,
100-
sharex: bool | Literal["none", "all", "row", "col"] = ...,
101-
sharey: bool | Literal["none", "all", "row", "col"] = ...,
102-
squeeze: Literal[True] = ...,
103-
width_ratios: Sequence[float] | None = ...,
104-
height_ratios: Sequence[float] | None = ...,
105-
subplot_kw: dict[str, Any] | None = ...,
106-
gridspec_kw: dict[str, Any] | None = ...,
107-
) -> Axes: ...
108-
@overload
109-
def subplots(
110-
self,
111-
nrows: int = ...,
112-
ncols: int = ...,
113-
*,
114-
sharex: bool | Literal["none", "all", "row", "col"] = ...,
115-
sharey: bool | Literal["none", "all", "row", "col"] = ...,
116-
squeeze: Literal[True],
117-
width_ratios: Sequence[float] | None = ...,
118-
height_ratios: Sequence[float] | None = ...,
119-
subplot_kw: dict[str, Any] | None = ...,
120-
gridspec_kw: dict[str, Any] | None = ...,
121-
) -> np.ndarray: ... # TODO numpy/numpy#24738
122-
@overload
12395
def subplots(
12496
self,
12597
nrows: int = ...,
@@ -146,7 +118,7 @@ class FigureBase(Artist):
146118
height_ratios: Sequence[float] | None = ...,
147119
subplot_kw: dict[str, Any] | None = ...,
148120
gridspec_kw: dict[str, Any] | None = ...,
149-
) -> Axes | np.ndarray: ...
121+
) -> Any: ...
150122
def delaxes(self, ax: Axes) -> None: ...
151123
def clear(self, keep_observers: bool = ...) -> None: ...
152124
def clf(self, keep_observers: bool = ...) -> None: ...

0 commit comments

Comments
 (0)