objwatch.wrappers.abc_wrapper module¶
- class objwatch.wrappers.abc_wrapper.ABCWrapper[source]¶
Bases:
ABCAbstract base class for function wrappers to extend tracing and logging functionality.
- abstract wrap_call(func_name: str, frame: FrameType) str[source]¶
Process and format the function call information.
- abstract wrap_return(func_name: str, result: Any) str[source]¶
Process and format the function return information.
- abstract wrap_upd(old_value: Any, current_value: Any) Tuple[str, str][source]¶
Process and format the update information of a variable.
- _extract_args_kwargs(frame: FrameType) Tuple[List[Any], dict][source]¶
Extract positional and keyword arguments from the current frame.
- Parameters:
frame (
FrameType) – The current stack frame.- Returns:
Lists of positional and keyword arguments.
- Return type:
Tuple[List[Any], dict]
- _format_args_kwargs(args: List[Any], kwargs: dict) str[source]¶
Format positional and keyword arguments into a string.
- _format_return(result: Any) str[source]¶
Format the return value of a function.
- Parameters:
result (
Any) – The result returned by the function.- Returns:
Formatted return message.
- Return type:
- _abc_impl = <_abc._abc_data object>¶