From 2ebbc3dcb4cd4f4dedd0e46cba56cb63710fc3b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torsten=20W=C3=B6rtwein?= Date: Thu, 29 Sep 2022 11:22:39 -0400 Subject: [PATCH] TYP: de-duplicate some type unions --- pandas-stubs/_typing.pyi | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pandas-stubs/_typing.pyi b/pandas-stubs/_typing.pyi index ccdd58ff..b044efc5 100644 --- a/pandas-stubs/_typing.pyi +++ b/pandas-stubs/_typing.pyi @@ -53,7 +53,7 @@ PandasScalar = Union[bytes, datetime.date, datetime.datetime, datetime.timedelta DatetimeLike = Union[datetime.date, datetime.datetime, np.datetime64, Timestamp] # dtypes -NpDtype = Union[str, np.dtype[np.generic], type[Union[str, complex, bool, object]]] +NpDtype = Union[str, np.dtype[np.generic], type[object]] Dtype = Union[ExtensionDtype, NpDtype] AstypeArg = Union[ExtensionDtype, npt.DTypeLike] # DtypeArg specifies all allowable dtypes in a functions its dtype argument @@ -135,12 +135,8 @@ Scalar = Union[ str, bytes, datetime.date, - datetime.datetime, datetime.timedelta, - bool, complex, - Timestamp, - Timedelta, ] ScalarT = TypeVar("ScalarT", bound=Scalar) # Refine the definitions below in 3.9 to use the specialized type.