objwatch.wrappers.base_wrapper module

class objwatch.wrappers.base_wrapper.BaseWrapper[source]

Bases: ABCWrapper

BaseWrapper implements the ABCWrapper abstract methods to provide basic logging functionality.

wrap_call(func_name: str, frame: FrameType) str[source]

Format the function call information.

Parameters:
  • func_name (str) – Name of the function being called.

  • frame (FrameType) – The current stack frame.

Returns:

Formatted call message.

Return type:

str

wrap_return(func_name: str, result: Any) str[source]

Format the function return information.

Parameters:
  • func_name (str) – Name of the function returning.

  • result (Any) – The result returned by the function.

Returns:

Formatted return message.

Return type:

str

wrap_upd(old_value: Any, current_value: Any) Tuple[str, str][source]

Format the update information of a variable.

Parameters:
  • old_value (Any) – The old value of the variable.

  • current_value (Any) – The new value of the variable.

Returns:

Formatted old and new values.

Return type:

Tuple[str, str]

_abc_impl = <_abc._abc_data object>