tyro._backends._completion._spec¶
Completion specification format and serialization.
This module defines the JSON-serializable completion spec format used by the embedded Python completion logic in bash/zsh scripts.
Module Contents¶
- tyro._backends._completion._spec.build_completion_spec(parser_spec: tyro._parsers.ParserSpecification, prog: str) Dict[str, Any][source]¶
Build a completion specification from a ParserSpecification.
- Parameters:
parser_spec (tyro._parsers.ParserSpecification) – Parser specification to convert.
prog (str) – Program name.
- Returns:
Dictionary representing the completion spec.
- Return type:
Dict[str, Any]