Skip to content

Commit 919a85d

Browse files
committed
setup ._typing.py
1 parent 570443d commit 919a85d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/_typing.py

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
tzinfo,
77
)
88
from os import PathLike
9+
import sys
910
from typing import (
1011
TYPE_CHECKING,
1112
Any,
@@ -83,8 +84,13 @@
8384
# Name "npt._ArrayLikeInt_co" is not defined [name-defined]
8485
NumpySorter = Optional[npt._ArrayLikeInt_co] # type: ignore[name-defined]
8586

87+
if sys.version_info >= (3, 11):
88+
from typing import Self
89+
else:
90+
from typing_extensions import Self # pyright: reportUnusedImport = false
8691
else:
8792
npt: Any = None
93+
Self: Any = None
8894

8995
HashableT = TypeVar("HashableT", bound=Hashable)
9096

0 commit comments

Comments
 (0)