Skip to main content

Flake8 plugin to enforce consistent type annotation styles

Project description

flake8-type-annotations

wemake.services Build Status Coverage Python Version PyPI version

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flake8-type-annotations, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size flake8_type_annotations-0.1.0-py3-none-any.whl (6.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size flake8-type-annotations-0.1.0.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page