flake8-assert-msg-1.1.1
توضیحات
flake8 plugin which forbids assert statements without messages
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | flake8-assert-msg-1.1.1 |
| نام | flake8-assert-msg |
| نسخه کتابخانه | 1.1.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Ruairidh MacLeod |
| ایمیل نویسنده | ruairidh@rkm.dev |
| آدرس صفحه اصلی | https://github.com/rkm/flake8-assert-msg |
| آدرس اینترنتی | https://pypi.org/project/flake8-assert-msg/ |
| مجوز | MIT |
# flake8-assert-msg
flake8 plugin which forbids assert statements without messages.
## Installation
`pip install flake8-assert-msg`
## flake8 codes
| Code | Description |
|--------|-------------------------|
| ASS001 | do not use bare asserts |
## Rationale
This ensures that assertions have clear messages for failures. Adding a message to an assertion also acts as documentation for why the assertion is present.
## 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://gitlab.com/pycqa/flake8
rev: 3.8.1
hooks:
- id: flake8
additional_dependencies: [flake8-assert-msg==1.1.1]
```
## Acknowledgements
- https://github.com/asottile/flake8-walrus used as a template
نیازمندی
| مقدار | نام |
|---|---|
| >=3.7 | flake8 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl flake8-assert-msg-1.1.1:
pip install flake8-assert-msg-1.1.1.whl
نصب پکیج tar.gz flake8-assert-msg-1.1.1:
pip install flake8-assert-msg-1.1.1.tar.gz