Skip to content

Commit 44f0c1d

Browse files
committed
Revert "TYP: de-duplicate some type unions (pandas-dev#341)"
This reverts commit f54d5ed.
1 parent a560754 commit 44f0c1d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pandas-stubs/_typing.pyi

+5-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ PandasScalar = Union[bytes, datetime.date, datetime.datetime, datetime.timedelta
5353
DatetimeLike = Union[datetime.date, datetime.datetime, np.datetime64, Timestamp]
5454

5555
# dtypes
56-
NpDtype = Union[str, np.dtype[np.generic], type[object]]
56+
NpDtype = Union[str, np.dtype[np.generic], type[Union[str, complex, bool, object]]]
5757
Dtype = Union[ExtensionDtype, NpDtype]
5858
AstypeArg = Union[ExtensionDtype, npt.DTypeLike]
5959
# DtypeArg specifies all allowable dtypes in a functions its dtype argument
@@ -135,8 +135,12 @@ Scalar = Union[
135135
str,
136136
bytes,
137137
datetime.date,
138+
datetime.datetime,
138139
datetime.timedelta,
140+
bool,
139141
complex,
142+
Timestamp,
143+
Timedelta,
140144
]
141145
ScalarT = TypeVar("ScalarT", bound=Scalar)
142146
# Refine the definitions below in 3.9 to use the specialized type.

0 commit comments

Comments
 (0)