flake8-pep604-1.1.0
توضیحات
flake8 plugin to enforce use of `|` over `typing.Union`
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | flake8-pep604-1.1.0 |
| نام | flake8-pep604 |
| نسخه کتابخانه | 1.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Matthew Hughes |
| ایمیل نویسنده | matthewhughes934@gmail.com |
| آدرس صفحه اصلی | https://gitlab.com/matthewhughes/flake-pep604 |
| آدرس اینترنتی | https://pypi.org/project/flake8-pep604/ |
| مجوز | MIT |
# flake8-pep604
flake8 plugin which forbids use of `typing.Union` (in favour of `|`), per [PEP
604](https://www.python.org/dev/peps/pep-0604/).
Note the `|` notation is a syntax error for Python \< 3.10. In this case you can
use the `annotations` feature (see [PEP 563](https://peps.python.org/pep-0563/)).
## flake8 Codes
| Code | Description |
|--------|--------------------------------------------------|
| UNT001 | Use `\|` in place of `typing.Union`. See PEP-604 |
## Motivation
Motivated by just wanting to make a codebase consistent in usage between
`typing.Union` and union types.
Note you could also automate this via
[`pyupgrade`](https://github.com/asottile/pyupgrade#pep-604-typing-rewrites)
نیازمندی
| مقدار | نام |
|---|---|
| >=3.8 | flake8 |
| - | importlib-metadata |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl flake8-pep604-1.1.0:
pip install flake8-pep604-1.1.0.whl
نصب پکیج tar.gz flake8-pep604-1.1.0:
pip install flake8-pep604-1.1.0.tar.gz