flake8-init-return-1.0.0
توضیحات
flake8 plugin which makes sure that __init__ functions have a return type
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | flake8-init-return-1.0.0 |
| نام | flake8-init-return |
| نسخه کتابخانه | 1.0.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Mark Keller |
| ایمیل نویسنده | mark@markkeller.dev |
| آدرس صفحه اصلی | https://github.com/keller00/flake8-init-return |
| آدرس اینترنتی | https://pypi.org/project/flake8-init-return/ |
| مجوز | MIT |
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 initalizer |
## rationale
As [PEP-484](https://peps.python.org/pep-0484/) 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](https://github.com/pre-commit/pre-commit) for instructions
Sample `.pre-commit-config.yaml`:
```yaml
- repo: https://github.com/pycqa/flake8
rev: 3.8.1
hooks:
- id: flake8
additional_dependencies: [flake8-init-return==1.0.0]
```
نیازمندی
| مقدار | نام |
|---|---|
| >=3.7 | flake8 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl flake8-init-return-1.0.0:
pip install flake8-init-return-1.0.0.whl
نصب پکیج tar.gz flake8-init-return-1.0.0:
pip install flake8-init-return-1.0.0.tar.gz