Skip to content

Commit 25ce7ed

Browse files
committed
revert annotations and add TODO for maybe_cast_to_EA
1 parent 3be4aba commit 25ce7ed

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/core/dtypes/cast.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,8 +342,10 @@ def maybe_cast_result_dtype(dtype: DtypeObj, how: str) -> DtypeObj:
342342
return dtype
343343

344344

345+
# TODO: annotate obj, return type
346+
# both ArrayLike but not necessarily the same => need a Union (xref GH36100)
345347
def maybe_cast_to_extension_array(
346-
cls: Type["ExtensionArray"], obj: ArrayLike, dtype: Optional[ExtensionDtype] = None
348+
cls: Type["ExtensionArray"], obj, dtype: Optional[ExtensionDtype] = None
347349
) -> ArrayLike:
348350
"""
349351
Call to `_from_sequence` that returns the object unchanged on Exception.

0 commit comments

Comments
 (0)