|
25 | 25 | from pandas.core.generic import NDFrame # noqa: F401
|
26 | 26 | from pandas import Interval # noqa: F401
|
27 | 27 |
|
| 28 | +# arrary-like |
28 | 29 |
|
29 | 30 | AnyArrayLike = TypeVar("AnyArrayLike", "ExtensionArray", "Index", "Series", np.ndarray)
|
30 | 31 | ArrayLike = TypeVar("ArrayLike", "ExtensionArray", np.ndarray)
|
31 |
| -DatetimeLikeScalar = TypeVar("DatetimeLikeScalar", "Period", "Timestamp", "Timedelta") |
32 |
| -Dtype = Union[str, np.dtype, "ExtensionDtype"] |
33 |
| -FilePathOrBuffer = Union[str, Path, IO[AnyStr]] |
34 | 32 |
|
35 |
| -FrameOrSeries = TypeVar("FrameOrSeries", bound="NDFrame") |
| 33 | +# scalars |
| 34 | + |
36 | 35 | PythonScalar = Union[str, int, float, bool]
|
| 36 | +DatetimeLikeScalar = TypeVar("DatetimeLikeScalar", "Period", "Timestamp", "Timedelta") |
37 | 37 | PandasScalar = Union[DatetimeLikeScalar, "Interval"]
|
38 | 38 | Scalar = Union[PythonScalar, PandasScalar]
|
| 39 | + |
| 40 | +# other |
| 41 | + |
| 42 | +Dtype = Union[str, np.dtype, "ExtensionDtype"] |
| 43 | +FilePathOrBuffer = Union[str, Path, IO[AnyStr]] |
| 44 | +FrameOrSeries = TypeVar("FrameOrSeries", bound="NDFrame") |
39 | 45 | Axis = Union[str, int]
|
40 | 46 | Ordered = Optional[bool]
|
41 | 47 | JSONSerializable = Union[PythonScalar, List, Dict]
|
42 |
| - |
43 | 48 | Axes = Collection
|
44 | 49 |
|
45 | 50 | # to maintain type information across generic functions and parametrization
|
46 |
| -_T = TypeVar("_T") |
| 51 | +T = TypeVar("T") |
0 commit comments