A plugin for flake8 to ban naive datetime classes.
Project description
# flake8-datetimez
Check for python unsafe naive datetime module usages.
## List of warnings
DTZ001: The use of datetime.datetime.utcnow() is not allowed.
DTZ002: The use of datetime.datetime.utcfromtimestamp() is not allowed.
DTZ003: The use of datetime.datetime.now() without tz argument is not allowed.
DTZ004: The use of datetime.datetime.fromtimestamp() without tz argument is not allowed.
DTZ005: The use of datetime.datetime.strptime() must be followed by .replace(tzinfo=)
## Install
Install with pip
` $ pip install flake8-datetimez `
## Requirements - Python 3.6 or above - flake8 3.0.0 or above
## License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Hashes for flake8-datetimez-19.4.4.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d319553c45a6a4236bc6014b624cd1315aab722d68dff45e2aea233a3cef8aa |
|
MD5 | 168fd3064c6cd805b7306507e24c0a4d |
|
BLAKE2b-256 | c2c769508d9bd71290cf587eda0d9ba7c388acef090ed18971101543a9f84199 |