flake8 plugin which makes sure that __init__ functions have a return type
Project description
flake8-init-return
flake8 plugin which forbids not having a return type on a class' __init__
function
installation
pip install flake8-init-return
flake8 codes
Code | Description |
---|---|
FIR100 | missing return value for initializer |
rationale
As PEP-484 says, a class' __init__
functions ought to be annotated with -> None
. This plugin makes sure
that they are annotated, but it leaves up the type checking for another
tool.
This might be useful when a type checker is not yet integrated into a project's development flow.
as a pre-commit hook
See pre-commit for instructions
Sample .pre-commit-config.yaml
:
- repo: https://github.com/pycqa/flake8
rev: 3.8.1
hooks:
- id: flake8
additional_dependencies: [flake8-init-return==1.0.1]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for flake8_init_return-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a657d3aceb045741c6d852ce92c8c092ff0b3fc438587ce63e85054c381dcca |
|
MD5 | 9f0f6e933c3a8ad24525f303816fe425 |
|
BLAKE2b-256 | dd37a35759d6db9a241607ef3cbc8cc9effbb0f842c2591c0a014c4da69e91c8 |