File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5050import sys
5151import threading
5252import time
53- from typing import TYPE_CHECKING , cast , overload
53+ from typing import IO , TYPE_CHECKING , cast , overload
5454
5555from cycler import cycler # noqa: F401
5656import matplotlib
@@ -1259,11 +1259,11 @@ def draw() -> None:
12591259
12601260
12611261@_copy_docstring_and_deprecators (Figure .savefig )
1262- def savefig (* args , ** kwargs ) -> None :
1262+ def savefig (fname : str | os . PathLike | IO , ** kwargs ) -> None :
12631263 fig = gcf ()
12641264 # savefig default implementation has no return, so mypy is unhappy
12651265 # presumably this is here because subclasses can return?
1266- res = fig .savefig (* args , ** kwargs ) # type: ignore[func-returns-value]
1266+ res = fig .savefig (fname , ** kwargs ) # type: ignore[func-returns-value]
12671267 fig .canvas .draw_idle () # Need this if 'transparent=True', to reset colors.
12681268 return res
12691269
You can’t perform that action at this time.
0 commit comments