remove_ctx
A decorator that removes the AppContext argument from the function call if it is the first positional argument, ensuring compatibility with Flask's internal calling conventions.
def remove_ctx(
f: F
) - > F
Wraps a function to automatically strip an AppContext instance from the positional arguments if it is the first argument provided.
Parameters
| Name | Type | Description |
|---|---|---|
| f | F | The function to be wrapped, typically a Flask-related callback or method. |
Returns
| Type | Description |
|---|---|
F | A wrapped version of the original function that filters out the application context argument before execution. |