5 ms·
This is a big issue in the exchange of data via databases and APIs. IMHO, the initialization of a timezone-free datetime should ideally emit a warning in Pytho
by OutOfHere 2y ago
This is a big issue in the exchange of data via databases and APIs.
IMHO, the initialization of a timezone-free datetime should ideally emit a warning in Python.
- rented_mule 2y agoThere are linters that give you this statically, but you need to know to run the linter. An example: https://docs.astral.sh/ruff/rules/call-datetime-without-tzinfo/ https://docs.astral.sh/ruff/rules/call-datetime-without-tzin...
- OutOfHere 2y agoJust to be sure, is this rule enabled by default?
- rented_mule 2y agoIn the case of ruff, I don't believe so. Your config needs to specify ALL or DTZ.