Skip to content

synthesis

Class info

🛈 DocStrings

Generate CLI applications from CommandInfo objects.

Handler

Handler = Callable[[CommandInfo, dict[str, Any]], Any]

Called with the invoked command and its parsed parameter values.

is_help_param

is_help_param(param: Param) -> bool

Whether the param is an (auto-generated) help option.

Frameworks add their own help option, so these are skipped when synthesizing.

Source code in src/clinspector/synthesis/__init__.py
def is_help_param(param: Param) -> bool:
    """Whether the param is an (auto-generated) help option.

    Frameworks add their own help option, so these are skipped when synthesizing.
    """
    return param.is_flag and bool(param.opts) and set(param.opts) <= _HELP_OPTS