A flake8 plugin to ban type hints.
Project description
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
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
Built Distribution
File details
Details for the file flake8-no-types-1.5.0.tar.gz
.
File metadata
- Download URL: flake8-no-types-1.5.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 239972067a852ba19eee6aeaa2f2f89144f2c2d177eea03e1f24c8ff4395d04e |
|
MD5 | 7998b27cc3136efea675928aebb7b093 |
|
BLAKE2b-256 | f3204b69e216a1d5234da21a92dbf74954c860ed686bdc62a979e50562496fd3 |
File details
Details for the file flake8_no_types-1.5.0-py3-none-any.whl
.
File metadata
- Download URL: flake8_no_types-1.5.0-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 030d28cbcdb6a9f97cc03ab4f2920c801028b9f3fd63144acb6d00fc9455a827 |
|
MD5 | 5812a67b3844c97c7d300a930c43b229 |
|
BLAKE2b-256 | 88f49c1de0974c4fe059d47e3ae5c81a52155d8761c8ad08797585d596f82c37 |