get_param_completion
Analyzes a callback function's signature to map Click autocompletion arguments and returns a wrapped version of the function compatible with Click's completion system. It validates that the callback parameters match expected types or names and raises a ClickException if unsupported parameters are found.
def get_param_completion(
callback: Callable[..., Any] | None = None
) - > Callable[..., Any] | None
Wraps a callback function to align its signature with Click's autocompletion requirements by mapping parameters based on type hints or names. This ensures that the provided callback can correctly receive the Click context, command-line arguments, and the incomplete string being completed.
Parameters
| Name | Type | Description |
|---|---|---|
| callback | `Callable[..., Any] | None` = None |
Returns
| Type | Description |
|---|---|
| `Callable[..., Any] | None` |