We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97ad790 commit eaa97fbCopy full SHA for eaa97fb
lib/matplotlib/pyplot.py
@@ -1203,10 +1203,11 @@ def sca(ax: Axes) -> None:
1203
"""
1204
Set the current Axes to *ax* and the current Figure to the parent of *ax*.
1205
1206
- figure(ax.figure)
1207
# Mypy sees ax.figure as potentially None,
1208
# but if you are calling this, it won't be None
1209
- ax.figure.sca(ax) # type: ignore
+ # Additionally the slight difference between `Figure` and `FigureBase` mypy catches
+ figure(ax.figure) # type: ignore[arg-type]
1210
+ ax.figure.sca(ax) # type: ignore[union-attr]
1211
1212
1213
def cla() -> None:
0 commit comments