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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flake8-type-annotations-0.1.0.tar.gz.
File metadata
- Download URL: flake8-type-annotations-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.11.2 CPython/3.6.5 Darwin/15.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88775455792ad7bbd63a71bc94e8a077deb5608eacb5add7e5a7a648c7636426
|
|
| MD5 |
f3002c943784f7ae02b95eb9e2263589
|
|
| BLAKE2b-256 |
06e26c006b0be107a05bd18c628fcb375a0385324945e3b83e134d1fc6b11bdb
|
File details
Details for the file flake8_type_annotations-0.1.0-py3-none-any.whl.
File metadata
- Download URL: flake8_type_annotations-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.11.2 CPython/3.6.5 Darwin/15.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de64de5efef3277d7b6012e8618c37d35b21465fb16292e46e6eec5b87e47a8c
|
|
| MD5 |
5bac51582898b90faa4bc45349923fdf
|
|
| BLAKE2b-256 |
04e40ccc501ccadb718d8f71e70ccc9912a3266619008384b8773de787fa7c31
|