Skip to content

Commit

Permalink
Fix for type check failures
Browse files Browse the repository at this point in the history
  • Loading branch information
mrkn committed May 27, 2024
1 parent f06c37c commit 375379d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pandas/core/dtypes/cast.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@

if TYPE_CHECKING:
from collections.abc import (
Mapping,
Sequence,
Sized,
)
Expand Down Expand Up @@ -861,13 +862,13 @@ def infer_dtype_from_scalar(val) -> tuple[DtypeObj, Any]:
return dtype, val


def dict_compat(d: dict[Scalar, Scalar]) -> dict[Scalar, Scalar]:
def dict_compat(d: Mapping[Scalar, Scalar]) -> dict[Scalar, Scalar]:
"""
Convert datetimelike-keyed dicts to a Timestamp-keyed dict.
Convert datetimelike-keyed Mappings to a Timestamp-keyed dict.
Parameters
----------
d: dict-like object
d: Mapping object
Returns
-------
Expand Down

0 comments on commit 375379d

Please sign in to comment.