diff --git a/ci/mypy-stubtest-allowlist.txt b/ci/mypy-stubtest-allowlist.txt index 5bb4f0d36c5e..adce733ea011 100644 --- a/ci/mypy-stubtest-allowlist.txt +++ b/ci/mypy-stubtest-allowlist.txt @@ -55,3 +55,6 @@ matplotlib\.animation\.EventSourceProtocol # Avoid a regression in NewType handling for stubtest # https://github.com/python/mypy/issues/19877 matplotlib\.ft2font\.GlyphIndexType\.__init__ + +# getitem method only exists for 3.11 deprecation backcompatability +matplotlib.container.PieContainer.__getitem__ diff --git a/lib/matplotlib/container.pyi b/lib/matplotlib/container.pyi index 772801b16d6d..a23f8912cfd9 100644 --- a/lib/matplotlib/container.pyi +++ b/lib/matplotlib/container.pyi @@ -53,7 +53,7 @@ class ErrorbarContainer(Container): **kwargs ) -> None: ... -class PieContainer(Container): +class PieContainer: wedges: list[Wedge] def __init__( self, @@ -70,6 +70,7 @@ class PieContainer(Container): def add_texts(self, texts: list[Text], ) -> None: ... + def remove(self) -> None: ... class StemContainer(Container): markerline: Line2D