validate_call
Returns a decorated wrapper around the function that validates the arguments and, optionally, the return value.
def validate_call(
func: AnyCallableT | None = None,
config: ConfigDict | None = None,
validate_return: bool = False
) - > AnyCallableT | Callable[[AnyCallableT], AnyCallableT]
Returns a decorated wrapper around the function that validates the arguments and, optionally, the return value.
Parameters
| Name | Type | Description |
|---|---|---|
| func | `AnyCallableT | None` = None |
| config | `ConfigDict | None` = None |
| validate_return | bool = False | Whether to validate the return value of the decorated function against its type hint. |
Returns
| Type | Description |
|---|---|
| `AnyCallableT | Callable[[AnyCallableT], AnyCallableT]` |