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.
Metadata
Release files for enforce-typehints 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| enforce_typehints-0.0.2.tar.gz | 3.9 kB | Without provenance | Details for enforce_typehints-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| enforce_typehints-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for enforce_typehints-0.0.2-py3-none-any.whl |
Total release size: 8.2 kB
Release files / enforce_typehints-0.0.2.tar.gz
| Download URL | enforce_typehints-0.0.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0de31fe3e4793c3256dcb496e852b2a9db991b8b81110b1598badcfb70a0f60e
|
|
BLAKE2b-256 checksum How to use checksums |
282fde23ec289e4d71b45719099be44aa9d7b49e2076b22256b920073cb49d38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
|
Release files / enforce_typehints-0.0.2-py3-none-any.whl
| Download URL | enforce_typehints-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf369b19e6a9cd0acf0669d25a713af6007ea2b3ea2b3108ede5172a7480ad7e
|
|
BLAKE2b-256 checksum How to use checksums |
2a695dd65c84e44b577fa2e1d978dbfbd7ab446949453da96f2e585bbef4653d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2
|
Security for enforce-typehints 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.