Skip to main content

Flake8 plugin to enforce consistent type annotation styles

Project description

flake8-type-annotations 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.


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



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

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page