checksignature-0.0.1rc2
توضیحات
a function decorator for enforcing function signatures
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | checksignature-0.0.1rc2 |
| نام | checksignature |
| نسخه کتابخانه | 0.0.1rc2 |
| نگهدارنده | ['Emmanuel I. Obi'] |
| ایمیل نگهدارنده | ['withtwoemms@gmail.com'] |
| نویسنده | Emmanuel I. Obi |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/withtwoemms/checksignature |
| آدرس اینترنتی | https://pypi.org/project/checksignature/ |
| مجوز | MIT |
# checksignature
> a function decorator for enforcing function signatures
[](https://github.com/withtwoemms/checksignature/actions?query=workflow%3Atests)
[](https://github.com/withtwoemms/checksignature/actions?query=workflow%3Apublish)
[](https://codecov.io/gh/withtwoemms/checksignature)
# Setup
Ensure `nox` is installed.
```
pip install nox
```
Run `nox` to build, install, and run `checksignature` tests.
# Usage
Decorate any funciton with `@checksignature`.
```python
@checksignature
def function(a: str, b: int, c, **kwargs):
return a, b, c, kwargs
```
Upon invocation of `function`, the signature check is evaluated.
```python
function('one', 2, 3.0, **{'four': 4}) #=> functions as usual--no problem.
function(1, 2, 3.0, **{'four': 4}) #=> raises a TypeError
```
نحوه نصب
نصب پکیج whl checksignature-0.0.1rc2:
pip install checksignature-0.0.1rc2.whl
نصب پکیج tar.gz checksignature-0.0.1rc2:
pip install checksignature-0.0.1rc2.tar.gz