Skip to content

TyperCommandLike

Base classes

Name Children Inherits
Protocol
typing
Base class for protocol classes.

⋔ Inheritance diagram

graph TD
  2119617558["cli_types.TyperCommandLike"]
  1073422405["typing.Protocol"]
  3481597255["typing.Generic"]
  2751680898["builtins.object"]
  1073422405 --> 2119617558
  3481597255 --> 1073422405
  2751680898 --> 3481597255

🛈 DocStrings

Bases: Protocol

Protocol for Typer-like command objects.

Source code in src/toprompt/cli_types.py
@runtime_checkable
class TyperCommandLike(Protocol):
    """Protocol for Typer-like command objects."""

    info: Any  # Typer instances have an info attribute
    registered_callback: Any  # And a registered_callback
    registered_commands: dict[str, Any]  # Commands are stored here

:fa-brands-github: Show source on GitHub