EnterExitCall

class app.util.helpers.enter_exit_call.EnterExitCall[source]

Bases: object

Context manager to call enter and exit methods with optional arguments.

Useful for temporarily changing state (e.g., freezing/unfreezing) in a with-block.

Inheritance diagram of EnterExitCall

Inheritance Diagram for EnterExitCall

Methods

__init__(enter, exit)

Initialize the EnterExitCall context manager.

enter()

Call the enter method with provided arguments.

exit()

Call the exit method with provided arguments.

__init__(enter: __annotationlib_name_1__ | Callable, exit: __annotationlib_name_2__ | Callable) None[source]

Initialize the EnterExitCall context manager.

Parameters:
  • enter (__annotationlib_name_1__ | Callable)

  • exit (__annotationlib_name_2__ | Callable)

Return type:

None

enter() Self[source]

Call the enter method with provided arguments.

Return type:

Self

exit() None[source]

Call the exit method with provided arguments.

Return type:

None