Skip to content

chore: aware datetimes #5210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 1, 2023
Merged

Conversation

bastimeyer
Copy link
Member

  • Add "DTZ" ruff rule
  • Add utility functions to streamlink.utils.times which use "aware" datetimes with explicit timezone information, and use isodate's local timezone implementation
  • Replace all "naive" datetimes without timezone information
  • Replace all custom ISO8601 parsers with isodate's implementation
  • Add tests for new utility functions

https://docs.python.org/3/library/datetime.html#aware-and-naive-objects
https://beta.ruff.rs/docs/rules/#flake8-datetimez-dtz

- Add "DTZ" ruff rule
- Add utility functions to `streamlink.utils.times` which use
  "aware" datetimes with explicit timezone information,
  and use `isodate`'s local timezone implementation
- Replace all "naive" datetimes without timezone information
- Replace all custom ISO8601 parsers with `isodate`'s implementation
- Add tests for new utility functions
@gravyboat gravyboat merged commit 49988a0 into streamlink:master Mar 1, 2023
@bastimeyer bastimeyer deleted the aware-datetimes branch March 1, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants