Skip to content

Commit 6da96da

Browse files
jkseppanGameRoMan
authored andcommitted
Backport PR #30237: Add explicit **options: Any for add_subplot method
1 parent 4b7ea09 commit 6da96da

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

lib/matplotlib/figure.pyi

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,20 @@ class FigureBase(Artist):
8787

8888
# TODO: docstring indicates SubplotSpec a valid arg, but none of the listed signatures appear to be that
8989
@overload
90+
def add_subplot(self, *args: Any, projection: Literal["3d"], **kwargs: Any) -> Axes3D: ...
91+
@overload
9092
def add_subplot(
91-
self, nrows: int, ncols: int, index: int | tuple[int, int], **kwargs
93+
self, nrows: int, ncols: int, index: int | tuple[int, int], **kwargs: Any
9294
) -> Axes: ...
9395
@overload
94-
def add_subplot(self, pos: int, **kwargs) -> Axes: ...
96+
def add_subplot(self, pos: int, **kwargs: Any) -> Axes: ...
9597
@overload
96-
def add_subplot(self, ax: Axes, **kwargs) -> Axes: ...
98+
def add_subplot(self, ax: Axes, **kwargs: Any) -> Axes: ...
9799
@overload
98-
def add_subplot(self, ax: SubplotSpec, **kwargs) -> Axes: ...
100+
def add_subplot(self, ax: SubplotSpec, **kwargs: Any) -> Axes: ...
99101
@overload
100-
def add_subplot(self, **kwargs) -> Axes: ...
102+
def add_subplot(self, **kwargs: Any) -> Axes: ...
103+
101104
@overload
102105
def subplots(
103106
self,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy