remove_ctx
A decorator that removes the AppContext object from the function arguments if it is passed as the first positional argument.
def remove_ctx(
f: F
) - > F
Removes the application context from the arguments list if it is present as the first positional argument. This decorator ensures compatibility for functions that may be passed an AppContext instance but do not require it for their execution.
Parameters
| Name | Type | Description |
|---|---|---|
| f | F | The function to be wrapped and protected from receiving an unnecessary application context argument. |
Returns
| Type | Description |
|---|---|
F | A wrapped version of the original function that filters out the AppContext argument before execution. |