Skip to content

Commit

Permalink
Fix pandas not liking str subclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
cutoffthetop committed Nov 20, 2023
1 parent 1a8c7bd commit cd60b4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mex/common/types/timestamp.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def _parse_timestamp(value: "Timestamp") -> tuple[datetime, TimestampPrecision]:
def _parse_string(value: str) -> tuple[datetime, TimestampPrecision]:
"""Parse a string containing a timestamp using pandas' tslibs."""
parsed, precision = parsing.parse_datetime_string_with_reso( # type: ignore[attr-defined]
value, freq=None, dayfirst=False, yearfirst=True
str(value), freq=None, dayfirst=False, yearfirst=True
)
if parsed.tzinfo is None:
parsed = parsed.replace(tzinfo=CET)
Expand Down

0 comments on commit cd60b4e

Please sign in to comment.