Flake8 plugin to enforce consistent type annotation styles
Project description
flake8-type-annotations
This tool is used to validate type annotations syntax as it was originally proposed by Guido van Rossum.
Installation
pip install flake8-type-annotations
Code example
# Consistency with this plugin:
def function(param=0, other: int = 0) -> int:
return param + other
# Possible errors without this plugin:
def function(param=0, other: int=0)->int:
return param + other
Error codes
Error code | Description |
---|---|
T800 | Missing spaces between parameter annotation and default value |
T801 | Missing spaces in return type annotation |
License
MIT.
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for flake8-type-annotations-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88775455792ad7bbd63a71bc94e8a077deb5608eacb5add7e5a7a648c7636426 |
|
MD5 | f3002c943784f7ae02b95eb9e2263589 |
|
BLAKE2b-256 | 06e26c006b0be107a05bd18c628fcb375a0385324945e3b83e134d1fc6b11bdb |
Close
Hashes for flake8_type_annotations-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de64de5efef3277d7b6012e8618c37d35b21465fb16292e46e6eec5b87e47a8c |
|
MD5 | 5bac51582898b90faa4bc45349923fdf |
|
BLAKE2b-256 | 04e40ccc501ccadb718d8f71e70ccc9912a3266619008384b8773de787fa7c31 |