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]
Metadata
Release files for flake8-init-return 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| flake8_init_return-1.0.1.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flake8_init_return-1.0.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 6.9 kB
Release files / flake8_init_return-1.0.1.tar.gz
| Download URL | flake8_init_return-1.0.1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
790aee0fb0ee0d172944ba5d72d8a7f69a7d3cff4bb2c4b8aef61b3f433c7e44
|
|
BLAKE2b-256 checksum How to use checksums |
3d8e60e324a84a8d592ddec987d2f2eb457253214df6f03f61023d4c0cc6095a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|
Release files / flake8_init_return-1.0.1-py2.py3-none-any.whl
| Download URL | flake8_init_return-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
9a657d3aceb045741c6d852ce92c8c092ff0b3fc438587ce63e85054c381dcca
|
|
BLAKE2b-256 checksum How to use checksums |
dd37a35759d6db9a241607ef3cbc8cc9effbb0f842c2591c0a014c4da69e91c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.2
|