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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file flake8-type-annotations-0.1.0.tar.gz.

File metadata

  • Download URL: flake8-type-annotations-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.11.2 CPython/3.6.5 Darwin/15.6.0

File hashes

Hashes for flake8-type-annotations-0.1.0.tar.gz
Algorithm Hash digest
SHA256 88775455792ad7bbd63a71bc94e8a077deb5608eacb5add7e5a7a648c7636426
MD5 f3002c943784f7ae02b95eb9e2263589
BLAKE2b-256 06e26c006b0be107a05bd18c628fcb375a0385324945e3b83e134d1fc6b11bdb

See more details on using hashes here.

File details

Details for the file flake8_type_annotations-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flake8_type_annotations-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de64de5efef3277d7b6012e8618c37d35b21465fb16292e46e6eec5b87e47a8c
MD5 5bac51582898b90faa4bc45349923fdf
BLAKE2b-256 04e40ccc501ccadb718d8f71e70ccc9912a3266619008384b8773de787fa7c31

See more details on using hashes here.

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