Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

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

Unmaintained (2022-12-07)

I stopped maintaining this package as it has never been popular. Also, it isn’t really practical to ban all type hints, since tools like dataclasses use them at runtime.


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.11 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

Metadata

Release files for flake8-no-types 1.5.1

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-no-types 1.5.1
File Size Uploaded
flake8-no-types-1.5.1.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flake8-no-types 1.5.1
File Interpreter ABI Platform
flake8_no_types-1.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / flake8-no-types-1.5.1.tar.gz

Download URL flake8-no-types-1.5.1.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bced358eba1400a08042aaae8b760fb5c4e12847786eb528d3fb51accbbaf422
BLAKE2b-256 checksum
How to use checksums
751e7fabc3d207557fe8fcae25c41468cb1b86f0dab3ed19c4bdebd385370d45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / flake8_no_types-1.5.1-py3-none-any.whl

Download URL flake8_no_types-1.5.1-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b09293dcc32c73808fbdba858f44875dd79dbbd8b392e95a6985a6feb50354b
BLAKE2b-256 checksum
How to use checksums
6bde61a74b97bd6d950dbff2399beac6a7a5db9e7267b35e23fd2a8f750a8b26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0
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