Skip to content

Commit 375379d

Browse files
committed
Fix for type check failures
1 parent f06c37c commit 375379d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/core/dtypes/cast.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888

8989
if TYPE_CHECKING:
9090
from collections.abc import (
91+
Mapping,
9192
Sequence,
9293
Sized,
9394
)
@@ -861,13 +862,13 @@ def infer_dtype_from_scalar(val) -> tuple[DtypeObj, Any]:
861862
return dtype, val
862863

863864

864-
def dict_compat(d: dict[Scalar, Scalar]) -> dict[Scalar, Scalar]:
865+
def dict_compat(d: Mapping[Scalar, Scalar]) -> dict[Scalar, Scalar]:
865866
"""
866-
Convert datetimelike-keyed dicts to a Timestamp-keyed dict.
867+
Convert datetimelike-keyed Mappings to a Timestamp-keyed dict.
867868
868869
Parameters
869870
----------
870-
d: dict-like object
871+
d: Mapping object
871872
872873
Returns
873874
-------

0 commit comments

Comments
 (0)