get_param_callback
Wraps a callback function to automatically map Click context, parameter, and value arguments based on their type hints or position. It returns a wrapper function that optionally applies a converter to the input value before executing the original callback.
def get_param_callback(
callback: Callable[..., Any] | None = None,
convertor: Callable[..., Any] | None = None
) - > Callable[..., Any] | None
Wraps a user-provided callback function to automatically map Click context, parameter, and value arguments based on their type hints or positions. This allows for flexible callback signatures while ensuring compatibility with Click's internal execution model.
Parameters
| Name | Type | Description |
|---|---|---|
| callback | `Callable[..., Any] | None` = None |
| convertor | `Callable[..., Any] | None` = None |
Returns
| Type | Description |
|---|---|
| `Callable[..., Any] | None` |