checksignature
a function decorator for enforcing function signatures
Setup
Install build dependencies.
pip install -r requirements
Run nox to build, install, and run checksignature tests.
Usage
Decorate any funciton with @checksignature.
@checksignature
def function(a: str, b: int, c, *args: int, **kwargs: int)::
return a, b, c, args, kwargs
Upon invocation of function, the signature check is evaluated.
function('one', 2, 3.0, 1, 2, 3, **{'four': 4}) #=> functions as usual--no problem.
function('one', 2, 3.0, 1, 2, 3, **{'four': 4.0}) #=> raises a TypeError
function('one', 2, 'x', 1, 2, 3, **{'four': 4}) #=> raises a TypeError
Metadata
Release files for checksignature 0.1.1
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 |
|---|---|---|---|---|
| checksignature-0.1.1.tar.gz | 6.6 kB | Without provenance | Details for checksignature-0.1.1.tar.gz |
Release files / checksignature-0.1.1.tar.gz
| Download URL | checksignature-0.1.1.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
54ec49a2248d7d6bf44f70244075a77a2b8dd9d8077326ac76453de270870e67
|
|
BLAKE2b-256 checksum How to use checksums |
5b426416bf6b64a84e03e0271bd3b88cdbc8383bea031fd8756ba1ec305064bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.18
|
Security for checksignature 0.1.1
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.