Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flake8-datetimez

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flake8-datetimez

A plugin for flake8 to ban the usage of unsafe naive datetime class.

  • 20.10.0
  • PyPI
  • Socket score

Maintainers
1

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc