Skip to content
This repository has been archived by the owner on Mar 27, 2019. It is now read-only.

sobolevn/flake8-type-annotations

Repository files navigation

flake8-type-annotations

wemake.services Build Status Coverage Python Version PyPI version

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.

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.