# flake8-datetimez
A plugin for flake8 to ban the usage of unsafe naive datetime class.
## List of warnings
DTZ001 : The use of datetime.datetime() without tzinfo argument is not allowed.
DTZ002 : The use of datetime.datetime.today() is not allowed. Use datetime.datetime.now(tz=) instead.
DTZ003 : The use of datetime.datetime.utcnow() is not allowed. Use datetime.datetime.now(tz=) instead.
DTZ004 : The use of datetime.datetime.utcfromtimestamp() is not allowed. Use datetime.datetime.fromtimestamp(, tz=) instead.
DTZ005 : The use of datetime.datetime.now() without tz argument is not allowed.
DTZ006 : The use of datetime.datetime.fromtimestamp() without tz argument is not allowed.
DTZ007 : The use of datetime.datetime.strptime() without %z must be followed by .replace(tzinfo=) or .astimezone().
DTZ011 : The use of datetime.date.today() is not allowed. Use datetime.datetime.now(tz=).date() instead.
DTZ012 : The use of datetime.date.fromtimestamp() is not allowed. Use datetime.datetime.fromtimestamp(, tz=).date() instead.
## Install
Install with pip
` $ pip install flake8-datetimez `
## Requirements - Python 3.6 or above - flake8 3.0.0 or above
## License
MIT
Metadata
Release files for flake8-datetimez 20.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flake8-datetimez-20.10.0.tar.gz | 4.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_datetimez-20.10.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / flake8-datetimez-20.10.0.tar.gz
| Download URL | flake8-datetimez-20.10.0.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
78939f3bcbe2b7fe48235998545c869c27cdfac3f45685099a3f7366c1ffebc6
|
|
BLAKE2b-256 checksum How to use checksums |
049472744acab2d9460c092ad8252a13da8fc64685cfb84f3422c21c378da928
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.9
|
Release files / flake8_datetimez-20.10.0-py3-none-any.whl
| Download URL | flake8_datetimez-20.10.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
57aa2f55eb88797e2d8c06bd536ff8049b9f1ba877d81dc06ff8d9bdc195c1fc
|
|
BLAKE2b-256 checksum How to use checksums |
0f94c1e0448d04e84b6a3d49675c2cc301d91549f540dc5b27739e1d1c0ed171
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.6.9
|