Skip to content

Commit f4b96ea

Browse files
committed
Update imports of Self
1 parent 19735de commit f4b96ea

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+64
-68
lines changed

pandas/_libs/arrays.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from collections.abc import Sequence
2+
from typing import Self
23

34
import numpy as np
45

56
from pandas._typing import (
67
AxisInt,
78
DtypeObj,
8-
Self,
99
Shape,
1010
)
1111

pandas/_libs/internals.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ from collections.abc import (
33
Sequence,
44
)
55
from typing import (
6+
Self,
67
final,
78
overload,
89
)
@@ -12,7 +13,6 @@ import numpy as np
1213

1314
from pandas._typing import (
1415
ArrayLike,
15-
Self,
1616
npt,
1717
)
1818

pandas/_libs/sparse.pyi

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
from collections.abc import Sequence
2+
from typing import Self
23

34
import numpy as np
45

5-
from pandas._typing import (
6-
Self,
7-
npt,
8-
)
6+
from pandas._typing import npt
97

108
class SparseIndex:
119
length: int

pandas/_libs/tslibs/nattype.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ from datetime import (
66
from typing import (
77
Literal,
88
NoReturn,
9+
Self,
910
TypeAlias,
1011
overload,
1112
)
@@ -15,7 +16,6 @@ import numpy as np
1516
from pandas._libs.tslibs.period import Period
1617
from pandas._typing import (
1718
Frequency,
18-
Self,
1919
TimestampNonexistent,
2020
)
2121

pandas/_libs/tslibs/offsets.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ from datetime import (
77
from typing import (
88
Any,
99
Literal,
10+
Self,
1011
TypeVar,
1112
overload,
1213
)
@@ -16,7 +17,6 @@ import numpy as np
1617
from pandas._libs.tslibs.nattype import NaTType
1718
from pandas._typing import (
1819
OffsetCalendar,
19-
Self,
2020
npt,
2121
)
2222

pandas/_libs/tslibs/timedeltas.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ from datetime import timedelta
22
from typing import (
33
ClassVar,
44
Literal,
5+
Self,
56
TypeAlias,
67
overload,
78
)
@@ -14,7 +15,6 @@ from pandas._libs.tslibs import (
1415
)
1516
from pandas._typing import (
1617
Frequency,
17-
Self,
1818
npt,
1919
)
2020

pandas/_libs/tslibs/timestamps.pyi

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ from time import struct_time
99
from typing import (
1010
ClassVar,
1111
Literal,
12+
Self,
1213
TypeAlias,
1314
overload,
1415
)
@@ -22,10 +23,7 @@ from pandas._libs.tslibs import (
2223
Tick,
2324
Timedelta,
2425
)
25-
from pandas._typing import (
26-
Self,
27-
TimestampNonexistent,
28-
)
26+
from pandas._typing import TimestampNonexistent
2927

3028
_TimeZones: TypeAlias = str | _tzinfo | None | int
3129

pandas/core/arrays/_arrow_string_mixins.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
TYPE_CHECKING,
77
Any,
88
Literal,
9+
Self,
910
)
1011

1112
import numpy as np
@@ -24,10 +25,7 @@
2425
if TYPE_CHECKING:
2526
from collections.abc import Callable
2627

27-
from pandas._typing import (
28-
Scalar,
29-
Self,
30-
)
28+
from pandas._typing import Scalar
3129

3230

3331
class ArrowStringArrayMixin:

pandas/core/arrays/_mixins.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
TYPE_CHECKING,
66
Any,
77
Literal,
8+
Self,
89
cast,
910
overload,
1011
)
@@ -23,7 +24,6 @@
2324
PositionalIndexer2D,
2425
PositionalIndexerTuple,
2526
ScalarIndexer,
26-
Self,
2727
SequenceIndexer,
2828
Shape,
2929
TakeIndexer,

pandas/core/arrays/arrow/array.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
TYPE_CHECKING,
99
Any,
1010
Literal,
11+
Self,
1112
cast,
1213
overload,
1314
)
@@ -196,7 +197,6 @@ def floordiv_compat(
196197
NumpyValueArrayLike,
197198
PositionalIndexer,
198199
Scalar,
199-
Self,
200200
SortKind,
201201
TakeIndexer,
202202
TimeAmbiguous,

0 commit comments

Comments
 (0)