Skip to content

Commit f54d5ed

Browse files
authored
TYP: de-duplicate some type unions (pandas-dev#341)
1 parent 55aa80f commit f54d5ed

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

pandas-stubs/_typing.pyi

+1-5
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[Union[str, complex, bool, object]]]
56+
NpDtype = Union[str, np.dtype[np.generic], type[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,12 +135,8 @@ Scalar = Union[
135135
str,
136136
bytes,
137137
datetime.date,
138-
datetime.datetime,
139138
datetime.timedelta,
140-
bool,
141139
complex,
142-
Timestamp,
143-
Timedelta,
144140
]
145141
ScalarT = TypeVar("ScalarT", bound=Scalar)
146142
# Refine the definitions below in 3.9 to use the specialized type.

0 commit comments

Comments
 (0)