TAAFT
Free mode
100% free
Freemium
Free Trial
Deals

sobolevn / flake8-type-annotations

Flake8 plugin to enforce consistent type annotation styles

8 0 Language: Python License: MIT Updated: 7mo ago

README

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.

0 AIs selected
Clear selection
#
Name
Task