not_callable_in_transactions#

not_callable_in_transactions(func: Callable[[Node, Any], Any]) Callable[[Node, Any], Any][source]#

Wrapper to prevent certain functions from being used within a transaction.

Certain utils functions which that both get and set values would not work like expected in a transaction. This wrapper prevents misuse by throwing an error in such cases.

Parameters:

func (Callable[[Node, Any], Any]) – function to wrap

Returns:

Similar function, but not callable from transactions

Return type:

Callable[[Node, Any], Any]