Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cf441b9

Browse filesBrowse files
use Axes instead of Self
1 parent 182f468 commit cf441b9
Copy full SHA for cf441b9

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎lib/matplotlib/axes/_base.pyi

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_base.pyi
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import datetime
44
from collections.abc import Callable, Iterable, Iterator, Sequence
55
from matplotlib import cbook
66
from matplotlib.artist import Artist
7+
from matplotlib.axes import Axes
78
from matplotlib.axis import XAxis, YAxis, Tick
89
from matplotlib.backend_bases import RendererBase, MouseButton, MouseEvent
910
from matplotlib.cbook import CallbackRegistry
@@ -27,7 +28,6 @@ from cycler import Cycler
2728
import numpy as np
2829
from numpy.typing import ArrayLike
2930
from typing import Any, Literal, TypeVar, overload
30-
from typing_extensions import Self
3131
from matplotlib.typing import ColorType
3232

3333
_T = TypeVar("_T", bound=Artist)
@@ -385,8 +385,8 @@ class _AxesBase(martist.Artist):
385385
bbox_extra_artists: Sequence[Artist] | None = ...,
386386
for_layout_only: bool = ...
387387
) -> Bbox | None: ...
388-
def twinx(self) -> Self: ...
389-
def twiny(self) -> Self: ...
388+
def twinx(self) -> Axes: ...
389+
def twiny(self) -> Axes: ...
390390
def get_shared_x_axes(self) -> cbook.GrouperView: ...
391391
def get_shared_y_axes(self) -> cbook.GrouperView: ...
392392
def label_outer(self, remove_inner_ticks: bool = ...) -> None: ...

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.