|
1 | 1 | from collections.abc import Sequence |
2 | 2 | from typing import ( |
| 3 | + Self, |
3 | 4 | TypeAlias, |
4 | 5 | TypeVar, |
5 | 6 | ) |
6 | 7 |
|
7 | 8 | from pandas.core.base import IndexOpsMixin |
8 | 9 |
|
9 | 10 | from pandas._libs.indexing import _NDFrameIndexerBase |
| 11 | +from pandas._libs.missing import NAType |
| 12 | +from pandas._libs.tslibs.nattype import NaTType |
10 | 13 | from pandas._typing import ( |
| 14 | + Axis, |
| 15 | + AxisInt, |
| 16 | + Hashable, |
11 | 17 | MaskType, |
12 | 18 | Scalar, |
13 | 19 | ) |
@@ -38,20 +44,20 @@ class IndexingMixin: |
38 | 44 | def iat(self) -> _iAtIndexer: ... |
39 | 45 |
|
40 | 46 | class _NDFrameIndexer(_NDFrameIndexerBase): |
41 | | - axis = ... |
42 | | - def __call__(self, axis=...): ... |
43 | | - def __getitem__(self, key): ... |
44 | | - def __setitem__(self, key, value) -> None: ... |
45 | | - |
46 | | -class _LocationIndexer(_NDFrameIndexer): |
47 | | - def __getitem__(self, key): ... |
48 | | - |
49 | | -class _LocIndexer(_LocationIndexer): ... |
50 | | -class _iLocIndexer(_LocationIndexer): ... |
51 | | - |
52 | | -class _ScalarAccessIndexer(_NDFrameIndexerBase): |
53 | | - def __getitem__(self, key): ... |
54 | | - def __setitem__(self, key, value) -> None: ... |
55 | | - |
56 | | -class _AtIndexer(_ScalarAccessIndexer): ... |
57 | | -class _iAtIndexer(_ScalarAccessIndexer): ... |
| 47 | + axis: AxisInt | None = None |
| 48 | + def __call__(self, axis: Axis | None = None) -> Self: ... |
| 49 | + |
| 50 | +class _LocIndexer(_NDFrameIndexer): ... |
| 51 | +class _iLocIndexer(_NDFrameIndexer): ... |
| 52 | + |
| 53 | +class _AtIndexer(_NDFrameIndexerBase): |
| 54 | + def __getitem__(self, key: Hashable) -> Scalar: ... |
| 55 | + def __setitem__( |
| 56 | + self, key: Hashable, value: Scalar | NAType | NaTType | None |
| 57 | + ) -> None: ... |
| 58 | + |
| 59 | +class _iAtIndexer(_NDFrameIndexerBase): |
| 60 | + def __getitem__(self, key: int) -> Scalar: ... |
| 61 | + def __setitem__( |
| 62 | + self, key: int, value: Scalar | NAType | NaTType | None |
| 63 | + ) -> None: ... |
0 commit comments