Validates type annotations syntax as it was originally proposed by Guido van Rossum.
Deprecated and is no longer required after flake8 >=3.7
.
Not it is handled via E225
and E252
violation checks.
pip install flake8-type-annotations
# 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 code | Description |
---|---|
T800 | Missing spaces between parameter annotation and default value |
T801 | Missing spaces in return type annotation |
MIT.