Skip to content

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