8000 Type annotation add_subplot for projection="3d" · fedora-python/matplotlib@dc8f66e · GitHub
[go: up one dir, main page]

Skip to content

Commit dc8f66e

Browse files
stefanv< 8000 a class="Box-sc-g0xbh4-0 dkaFxu prc-Link-Link-85e08" data-muted="true" muted="" href="/fedora-python/matplotlib/commits?author=stefanv" aria-label="commits by stefanv" data-hovercard-url="/users/stefanv/hovercard">stefanv
committed
Type annotation add_subplot for projection="3d"
1 parent fa3e9da commit dc8f66e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/figure.pyi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
from typing import TYPE_CHECKING
2+
if TYPE_CHECKING:
3+
import mpl_toolkits
4+
15
from collections.abc import Callable, Hashable, Iterable, Sequence
26
import os
37
from typing import Any, IO, Literal, TypeVar, overload
@@ -87,6 +91,8 @@ class FigureBase(Artist):
8791

8892
# TODO: docstring indicates SubplotSpec a valid arg, but none of the listed signatures appear to be that
8993
@overload
94+
def add_subplot(self, *args, projection="3d", **kwargs) -> mpl_toolkits.mplot3d.Axes3D: ...
95+
@overload
9096
def add_subplot(
9197
self, nrows: int, ncols: int, index: int | tuple[int, int], **kwargs
9298
) -> Axes: ...

0 commit comments

Comments
 (0)
0