Skip to content

Commit ee5e6c4

Browse files
author
Laurent Mutricy
committed
better than cast
1 parent 0451e7a commit ee5e6c4

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

pandas/_testing/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107

108108
COMPLEX_DTYPES: list[Dtype] = [complex, "complex64", "complex128"]
109109
STRING_DTYPES: list[Dtype] = [str, "str", "U"]
110+
COMPLEX_FLOAT_DTYPES: list[Dtype] = [*COMPLEX_DTYPES, *FLOAT_NUMPY_DTYPES]
110111

111112
DATETIME64_DTYPES: list[Dtype] = ["datetime64[ns]", "M8[ns]"]
112113
TIMEDELTA64_DTYPES: list[Dtype] = ["timedelta64[ns]", "m8[ns]"]

pandas/conftest.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@
8484
Hashable,
8585
Iterator,
8686
)
87-
from typing import cast
88-
89-
from pandas._typing import Dtype
9087

9188
try:
9289
import pyarrow as pa
@@ -1451,7 +1448,7 @@ def complex_dtype(request):
14511448
return request.param
14521449

14531450

1454-
@pytest.fixture(params=tm.COMPLEX_DTYPES + cast(list[Dtype], tm.FLOAT_NUMPY_DTYPES))
1451+
@pytest.fixture(params=tm.COMPLEX_FLOAT_DTYPES)
14551452
def complex_or_float_dtype(request):
14561453
"""
14571454
Parameterized fixture for complex and numpy float dtypes.

0 commit comments

Comments
 (0)