@@ -32,7 +32,7 @@ from matplotlib._typing import Color, LineStyleType, MarkerType
3232
3333import datetime
3434import PIL
35- from typing import Any , Callable , Literal , Sequence , Type
35+ from typing import Any , Callable , Literal , Sequence , Type , overload
3636import numpy as np
3737from numpy .typing import ArrayLike
3838
@@ -53,8 +53,15 @@ class Axes(_AxesBase):
5353 ) -> tuple [list [Artist ], list [Any ]]: ...
5454 legend_ : Legend
5555
56- # TODO: legend signatures?
57- def legend (self , * args , ** kwargs ) -> Legend : ...
56+ @overload
57+ def legend (self ) -> Legend : ...
58+ @overload
59+ def legend (self , handles : Sequence [Artist ], labels : Sequence [str ]) -> Legend : ...
60+ @overload
61+ def legend (self , * , handles : Sequence [Artist ]) -> Legend : ...
62+ @overload
63+ def legend (self , labels : Sequence [str ]) -> Legend : ...
64+
5865 def inset_axes (
5966 self ,
6067 bounds : tuple [float , float , float , float ],
@@ -260,8 +267,6 @@ class Axes(_AxesBase):
260267 yrange : tuple [float , float ],
261268 ** kwargs
262269 ) -> BrokenBarHCollection : ...
263-
264- # TODO, expand out kwargs into override
265270 def stem (
266271 self ,
267272 * args : ArrayLike | str ,
0 commit comments