Skip to content

TldrExample

🛈 DocStrings

Example collected during parsing.

Source code in src/clinspector/help_providers/tldr_pages.py
@dataclass
class TldrExample:
    """Example collected during parsing."""

    description: str
    command: str = ""
    placeholders: dict[str, str] = field(default_factory=dict)

    def to_example(self) -> Example:
        """Convert to CommandInfo Example."""
        return Example(
            description=self.description,
            command=self.command,
            placeholders=self.placeholders,
        )

to_example

to_example() -> Example

Convert to CommandInfo Example.

Source code in src/clinspector/help_providers/tldr_pages.py
def to_example(self) -> Example:
    """Convert to CommandInfo Example."""
    return Example(
        description=self.description,
        command=self.command,
        placeholders=self.placeholders,
    )

:fa-brands-github: Show source on GitHub