enforce-typehints-0.0.2
توضیحات
Enforce type hints at import time
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | enforce-typehints-0.0.2 |
| نام | enforce-typehints |
| نسخه کتابخانه | 0.0.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Spindel Ljungmark |
| ایمیل نویسنده | spider@skuggor.se |
| آدرس صفحه اصلی | https://github.com/Spindel/enforce_typehints |
| آدرس اینترنتی | https://pypi.org/project/enforce-typehints/ |
| مجوز | - |
# Force static type hints at import time
This runs mypy on all imports, and currently just dumps the text, but
that shows the concept.
Properly hooking both path and file imports might requir something
more, and raising proper import errors when files don't pass is also
left to do.
However, conceptually it sort of works, and simply importing it in a
software can toggle the flag on to force strict typing more.
To use it, add "import typeforce.enforcing" to the modules of the initial
code, and watch your code explode when you have a badly typed module.
Also note, that imports will not just be slow, they will be very slow.
[](https://asciinema.org/a/4DbpNJvuvspyQGzt6VMlbd6MD)
نیازمندی
| مقدار | نام |
|---|---|
| - | mypy |
نحوه نصب
نصب پکیج whl enforce-typehints-0.0.2:
pip install enforce-typehints-0.0.2.whl
نصب پکیج tar.gz enforce-typehints-0.0.2:
pip install enforce-typehints-0.0.2.tar.gz