API reference

python:astx:astx.tools.typing.typechecked

function typechecked

typechecked(target: TypecheckedTarget) -> TypecheckedTarget

Source: packages/astx/src/astx/tools/typing.py:65

Instrument a function or class when runtime checking is enabled.

ARX_RUNTIME_TYPECHECK=1 at import enables argument, return, and all-item collection checks. Otherwise return the original target without runtime instrumentation or a call wrapper. Compiler semantic validation is independent of this developer-only setting.

Parameters

Returns

Result of this operation: instrument a function or class when runtime checking is enabled.; Type: TypecheckedTarget

Search documentation

Type to search.