Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/backend_bases.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ class NavigationToolbar2:
def release_zoom(self, event: Event) -> None: ...
def push_current(self) -> None: ...
subplot_tool: widgets.SubplotTool
def configure_subplots(self, *args: Any) -> widgets.SubplotTool: ...
def configure_subplots(self, *args: Any) -> Any: ...
Comment thread
karlhillx marked this conversation as resolved.
Outdated
def save_figure(self, *args) -> str | None | object: ...
def update(self) -> None: ...
def set_history_buttons(self) -> None: ...
Expand Down
9 changes: 5 additions & 4 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
import sys
import threading
import time
from typing import IO, TYPE_CHECKING, cast, overload
from typing import Any, IO, TYPE_CHECKING, cast, overload

from cycler import cycler # noqa: F401
import matplotlib
Expand Down Expand Up @@ -92,7 +92,7 @@
from collections.abc import Callable, Hashable, Iterable, Sequence
import pathlib
import os
from typing import Any, BinaryIO, Literal

Check warning on line 95 in lib/matplotlib/pyplot.py

View workflow job for this annotation

GitHub Actions / ruff

[rdjson] reported by reviewdog 🐶 Redefinition of unused `Any` from line 57: `Any` redefined here Raw Output: message:"Redefinition of unused `Any` from line 57: `Any` redefined here" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/pyplot.py" range:{start:{line:95 column:24} end:{line:95 column:27}}} severity:WARNING source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"redefined-while-unused" url:"https://docs.astral.sh/ruff/rules/redefined-while-unused"} suggestions:{range:{start:{line:95 column:5} end:{line:95 column:46}} text:"from typing import BinaryIO, Literal"}

Check warning on line 95 in lib/matplotlib/pyplot.py

View workflow job for this annotation

GitHub Actions / ruff

[rdjson] reported by reviewdog 🐶 Redefinition of unused `Any` from line 57: `Any` redefined here Raw Output: message:"Redefinition of unused `Any` from line 57: `Any` redefined here" location:{path:"/home/runner/work/matplotlib/matplotlib/lib/matplotlib/pyplot.py" range:{start:{line:95 column:24} end:{line:95 column:27}}} severity:WARNING source:{name:"ruff" url:"https://docs.astral.sh/ruff"} code:{value:"redefined-while-unused" url:"https://docs.astral.sh/ruff/rules/redefined-while-unused"} suggestions:{range:{start:{line:95 column:5} end:{line:95 column:46}} text:"from typing import BinaryIO, Literal"}

import PIL.Image
from numpy.typing import ArrayLike
Expand Down Expand Up @@ -153,7 +153,6 @@
ResizeEventType,
LogLevel
)
from matplotlib.widgets import SubplotTool
from matplotlib._api import _Unset


Expand Down Expand Up @@ -2152,13 +2151,15 @@
return ax1


def subplot_tool(targetfig: Figure | None = None) -> SubplotTool | None:
def subplot_tool(targetfig: Figure | None = None) -> Any:
Comment thread
karlhillx marked this conversation as resolved.
Outdated
"""
Launch a subplot tool window for a figure.

Returns
-------
`matplotlib.widgets.SubplotTool`
The subplot tool window. May be a `~matplotlib.widgets.SubplotTool`
(widgets backend), a backend-native dialog (e.g. Qt), or `None` for
backends that use the toolmanager.
Comment thread
karlhillx marked this conversation as resolved.
Outdated
"""
if targetfig is None:
targetfig = gcf()
Expand Down
Loading