Skip to content

bug: replace strptime() with ISO parsers for date/time parsing #784

Description

The _parse_date, _parse_datetime, and _parse_time helpers use datetime.strptime(), triggering Ruff DTZ007 due to naive datetime construction.

Replace the manual format loops with the appropriate fromisoformat() APIs to:

  • Remove the DTZ007 warnings.
  • Simplify the parsing logic.
  • Preserve the existing supported date, datetime, and time formats.

Add/update regression tests to verify the existing parsing behavior remains unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage neededFor new issues, not triaged yet.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions