fabricatio_tool.decorators
Decorators for confirming before executing a function.
Functions
|
Decorator to confirm before executing a function. |
Module Contents
- fabricatio_tool.decorators.confirm_to_execute[**P, R](func: Callable[P, R]) Callable[P, Coroutine[None, None, R | None]]
Decorator to confirm before executing a function.
- Parameters:
func (Callable) – The function to be executed
- Returns:
A decorator that wraps the function to confirm before execution.
- Return type:
Callable
Note
All functions, no matter async or sync, will be wrapped into an async functions, since confirm internally rely on async, It can not create another event loop if one is already executing.