Skip to main content

A flake8 plugin to ban type hints.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

https://img.shields.io/github/workflow/status/adamchainz/flake8-no-types/CI/main?style=for-the-badge https://img.shields.io/pypi/v/flake8-no-types.svg?style=for-the-badge https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge pre-commit

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 add type hints that can be incorrect.

Requirements

Python 3.7 to 3.10 supported.

Installation

First, install with pip:

python -m pip install flake8-no-types

Second, if you define Flake8’s select setting, add the NT prefix to it. Otherwise, the plugin should be active by default.


Linting a Django project? Check out my book Boost Your Django DX which covers Flake8 and many other code quality tools.


Rules

NT001: No type hints.

Flags all forms of type hints:

  • Function annotations: def foo() -> int:

  • Variable hints: foo: int = 1

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

flake8-no-types-1.4.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flake8_no_types-1.4.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file flake8-no-types-1.4.0.tar.gz.

File metadata

  • Download URL: flake8-no-types-1.4.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for flake8-no-types-1.4.0.tar.gz
Algorithm Hash digest
SHA256 8d2909c530a983d6d82246cee7198d8482d4b30ab6e036d8e168a1ac9890a834
MD5 a9a4ddbf43d644bbc5beedab572c54cb
BLAKE2b-256 271132baaab7210a13c8957ee6e25f9c2b4761bf16d83479e363e4ce537bd65c

See more details on using hashes here.

File details

Details for the file flake8_no_types-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: flake8_no_types-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for flake8_no_types-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 321108592bea4053e25e62b6bf661762cc28dcbbc8ddbaffa186835f0407e987
MD5 310b6c7b379e025c580e79b0b66b7b34
BLAKE2b-256 9e4d6c19465d19ba12ad857b205e557218fc9c815912ced1515e01b0af2da036

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page