Skip to main content

Description:

A python dectorater to enforce type checks on your python functions for your stupid colleagues who pass int type when you clearly told them to pass string. ヽ(ಠ_ಠ)ノ

You can define parameter and return types for your python functions using type hints (check them out here : https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html) and the watcher decorator over them to handle the dirty work.

Currently we only support positional arguments only and single return types but will add support for keyword arguments and mutiple return types.

Raise and issue in the gitrepo if you find any bugs or need a feature.

Types Checking Supported for

Positional Parameters

Single return types

User defined data types

Example

from be_holder import watcher


@watcher
def f():  # Will work as normal
    return "pass"

@watcher
def f1(a:str,b): #Will be typed checked and will raise TypeError if types do not match
    return "pass"
@watcher
def f2(a:str,b:int):
    return "pass":

@watcher
def f3()>str: #Will raise a type error due to return type not matching function definition
    return 1

@watcher    
def f4(a:str)->str:
    return "pass"

if __name__ == "__main__":
    f4(1)
    f2("s",1)
    f2(1,1)

Metadata

Release files for be-holder 1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for be-holder 1.2
File Size Uploaded Provenance Actions
be_holder-1.2.tar.gz 2.7 kB Without provenance Details for be_holder-1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for be-holder 1.2
File Interpreter ABI Platform Actions
be_holder-1.2-py3-none-any.whl Python 3 none any Details for be_holder-1.2-py3-none-any.whl

Total release size: 5.9 kB

Release files / be_holder-1.2.tar.gz

Download URL be_holder-1.2.tar.gz
Size 2.7 kB
Tags Source
SHA-256 checksum
How to use checksums
03934959b9264997e5a31e8fe3af6face55c7b6847260dff59731470a4597caf
BLAKE2b-256 checksum
How to use checksums
033a0090291ab5e0a942c7708084b938ee16d35ec7595c0b9901d1a0536ae0f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9

Release files / be_holder-1.2-py3-none-any.whl

Download URL be_holder-1.2-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2287c1364aef222737b0820725b7cd7e4f6da0ba153cffb05a418928e0187cf5
BLAKE2b-256 checksum
How to use checksums
47a9ac5c8a7e57feb3558401d30c177ae73454f1f2ffc931e0950519b8b96bda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9

Security for be-holder 1.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.

Release history Release notifications | RSS feed

This release

1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page