Skip to main content

# 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() must be followed by .replace(tzinfo=).

  • 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 19.5.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flake8-datetimez 19.5.4.0
File Size Uploaded Provenance Actions
flake8-datetimez-19.5.4.0.tar.gz 3.9 kB Without provenance Details for flake8-datetimez-19.5.4.0.tar.gz

Release files / flake8-datetimez-19.5.4.0.tar.gz

Download URL flake8-datetimez-19.5.4.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b929592691422f2f04fc69562009249e38e31ec5e1ef6818e55c7d8749bb2765
BLAKE2b-256 checksum
How to use checksums
d23108bd6854e60863054df9b5daf728e822f1d963616a6f47830db374c183f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

Security for flake8-datetimez 19.5.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page