diff --git a/ci/mypy-stubtest-allowlist.txt b/ci/mypy-stubtest-allowlist.txt index 0dcbdc17505f..6db1d6be923e 100644 --- a/ci/mypy-stubtest-allowlist.txt +++ b/ci/mypy-stubtest-allowlist.txt @@ -54,5 +54,8 @@ matplotlib\.animation\.EventSourceProtocol # https://github.com/python/mypy/issues/19877 matplotlib\.ft2font\.GlyphIndexType\.__init__ +# getitem method only exists for 3.11 deprecation backcompatability +matplotlib.container.PieContainer.__getitem__ + # 3.12 deprecation matplotlib\.axes\._base\._AxesBase\.ArtistList diff --git a/lib/matplotlib/container.pyi b/lib/matplotlib/container.pyi index bbcc0702d489..753fe518b9ef 100644 --- a/lib/matplotlib/container.pyi +++ b/lib/matplotlib/container.pyi @@ -57,7 +57,7 @@ class ErrorbarContainer(Container): **kwargs ) -> None: ... -class PieContainer(Container): +class PieContainer: wedges: list[Wedge] def __init__( self, @@ -74,6 +74,7 @@ class PieContainer(Container): def add_texts(self, texts: list[Text], ) -> None: ... + def remove(self) -> None: ... class StemContainer(Container): markerline: Line2D