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 Jul 4, 2024
1 parent 29eed79 commit 88cb50f
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 @@ -87,6 +87,7 @@

if TYPE_CHECKING:
from collections.abc import (
Mapping,
Sequence,
Sized,
)
Expand Down Expand Up @@ -860,13 +861,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 88cb50f

Please sign in to comment.