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.

Source Distribution

flake8-type-annotations-0.1.0.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

flake8_type_annotations-0.1.0-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page