Skip to content

Commit bd4469d

Browse files
committed
Review comments from Qulogic
Includes completion of rebase onto #25580, fixing type hint
1 parent 76316a9 commit bd4469d

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

.github/workflows/mypy-stubtest.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
2626
- name: Run mypy stubtest
2727
run: |
28-
set -o pipefail
2928
# the ignore missing imports can be removed when typed cycler is released and used
3029
MPLBACKEND=agg python -m mypy.stubtest matplotlib --mypy-config-file pyproject.toml \
3130
--allowlist ci/mypy-stubtest-allowlist.txt

.github/workflows/reviewdog.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6666
run: |
6767
set -o pipefail
68-
# the ignore missing imports can be removed when typed cycler is released and used
68+
# The --ignore-missing-imports can be removed when typed cycler is released and used
6969
mypy --config pyproject.toml lib/matplotlib \
7070
--ignore-missing-imports \
7171
--follow-imports silent | \

lib/matplotlib/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
"get_cachedir",
112112
"get_data_path",
113113
"matplotlib_fname",
114+
"MatplotlibDeprecationWarning",
114115
"RcParams",
115116
"rc_params",
116117
"rc_params_from_file",

lib/matplotlib/__init__.pyi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ __all__ = [
88
"get_cachedir",
99
"get_data_path",
1010
"matplotlib_fname",
11+
"MatplotlibDeprecationWarning",
1112
"RcParams",
1213
"rc_params",
1314
"rc_params_from_file",

lib/matplotlib/pyplot.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,10 @@
9090

9191
from numpy.typing import ArrayLike
9292
from typing import (
93-
Any, Callable, Literal, Sequence, Iterable, Type, Generator
93+
Any, Callable, Hashable, Literal, Sequence, Iterable, Type, Generator
9494
)
9595

9696
from matplotlib.axis import Tick
97-
from matplotlib.axes import SubplotBase
9897
from matplotlib.axes._base import _AxesBase
9998
from matplotlib.backend_bases import RendererBase, Event
10099
from matplotlib.cm import ScalarMappable
@@ -1578,9 +1577,9 @@ def subplot_mosaic(
15781577
empty_sentinel: Any = '.',
15791578
subplot_kw: dict[str, Any] | None = None,
15801579
gridspec_kw: dict[str, Any] | None = None,
1581-
per_subplot_kw: dict[Any, dict[str, Any]] | None = None,
1580+
per_subplot_kw: dict[Hashable, dict[str, Any]] | None = None,
15821581
**fig_kw
1583-
) -> tuple[Figure, dict[Any, matplotlib.axes.Axes]]:
1582+
) -> tuple[Figure, dict[Hashable, matplotlib.axes.Axes]]:
15841583
"""
15851584
Build a layout of Axes based on ASCII art or nested lists.
15861585
@@ -2189,7 +2188,7 @@ def thetagrids(
21892188

21902189

21912190
@_api.deprecated("3.7", pending=True)
2192-
def get_plot_commands() -> Generator[str, None, None]:
2191+
def get_plot_commands() -> list[str]:
21932192
"""
21942193
Get a sorted list of all of the plotting commands.
21952194
"""

requirements/testing/mypy.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Extra pip requirements for the GitHub Actions flake8 build
1+
# Extra pip requirements for the GitHub Actions mypy build
22

33
mypy
44

tools/check_typehints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
- Inheritance makes the set arithmetic harder when only loading AST
2929
- Attributes also make it more complicated when defined in init
3030
- Functions type hinted with ``overload`` are ignored for argument checking
31-
- Usually this means the implementation is is less strict in signature but will raise
31+
- Usually this means the implementation is less strict in signature but will raise
3232
if an invalid signature is used, type checking allows such errors to be caught by
3333
the type checker instead of at runtime.
3434
- Private attribute/functions are ignored

0 commit comments

Comments
 (0)