Skip to main content

A flake8 plugin to ban type hints.

Project description

flake8-no-types

https://img.shields.io/pypi/v/flake8-no-types.svg https://img.shields.io/travis/adamchainz/flake8-no-types.svg https://img.shields.io/badge/code%20style-black-000000.svg

A flake8 plugin to ban type hints.

This can be useful in code bases where you aren’t running type checking (yet?) but developers or their IDE’s keep adding type hints that can end up being incorrect.

Installation

Install from pip with:

pip install flake8-no-types

Python 3.5-3.8 supported.

When installed it will automatically be run as part of flake8; you can check it is being picked up with:

$ flake8 --version
3.7.9 (flake8-no-types: 1.0.0, mccabe: 0.6.1, pycodestyle: 2.5.0, pyflakes: 2.1.1) CPython 3.8.0 on Darwin

Rules

NT001: No type hints.

Complains about all forms of type hints:

  • Function annotations: def foo() -> int:
  • Variable hints: foo: int = 1

History

1.0.0 (2019-11-19)

  • First release on PyPI.
  • NT001 rule that complains about type annotations.

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flake8-no-types, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size flake8_no_types-1.0.0-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size flake8-no-types-1.0.0.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page