Skip to content

Commit a0a39ff

Browse files
committed
TYP: add correct type hint for maybe_downcast_to_dtype
1 parent 837d36d commit a0a39ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/dtypes/cast.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def is_nested_object(obj) -> bool:
134134
return False
135135

136136

137-
def maybe_downcast_to_dtype(result, dtype: Dtype):
137+
def maybe_downcast_to_dtype(result, dtype: Union[str, np.dtype]):
138138
"""
139139
try to cast to the specified dtype (e.g. convert back to bool/int
140140
or could be an astype of float64->float32

0 commit comments

Comments
 (0)