A flake8 plugin to ban type hints.
Project description
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
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
Hashes for flake8_no_types-1.5.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b09293dcc32c73808fbdba858f44875dd79dbbd8b392e95a6985a6feb50354b |
|
MD5 | eaf2c0757b67ff32f6e9031d43a28872 |
|
BLAKE2b-256 | 6bde61a74b97bd6d950dbff2399beac6a7a5db9e7267b35e23fd2a8f750a8b26 |