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

Release history Release notifications

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
flake8_type_annotations-0.1.0-py3-none-any.whl (6.9 kB) Copy SHA256 hash SHA256 Wheel py3
flake8-type-annotations-0.1.0.tar.gz (4.0 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page