/flake8-type-annotations

Flake8 plugin to enforce consistent type annotation styles

Primary LanguagePythonMIT LicenseMIT

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.