Skip to content

rich_click.utils

Attributes

NameDescription
notsetNo description.

Classes

NameDescription
CommandGroupDictSpecification for command groups.
OptionGroupDictSpecification for option groups.

Functions

NameDescription
method_is_from_subclass_ofCheck to see whether a class's method comes from a subclass of some base class.
truthyCheck if string or other obj is truthy.

notsetattributemodule attribute#

notset: Any = object()

CommandGroupDictclass#

class CommandGroupDict(TypedDict)

Bases: TypedDict

Specification for command groups.

column_typesattributeinstance attribute#

column_types: NotRequired[list[CommandColumnType] | None]

commandsattributeinstance attribute#

commands: NotRequired[list[str]]

deduplicateattributeinstance attribute#

deduplicate: NotRequired[bool]

helpattributeinstance attribute#

help: NotRequired[str | None]

help_styleattributeinstance attribute#

help_style: NotRequired[StyleType | None]

inline_help_in_titleattributeinstance attribute#

inline_help_in_title: NotRequired[bool | None]

nameattributeinstance attribute#

name: NotRequired[str]

panel_stylesattributeinstance attribute#

panel_styles: NotRequired[dict[str, Any] | None]

table_stylesattributeinstance attribute#

table_styles: NotRequired[dict[str, Any] | None]

title_styleattributeinstance attribute#

title_style: NotRequired[StyleType | None]

OptionGroupDictclass#

class OptionGroupDict(TypedDict)

Bases: TypedDict

Specification for option groups.

column_typesattributeinstance attribute#

column_types: NotRequired[list[OptionColumnType] | None]

deduplicateattributeinstance attribute#

deduplicate: NotRequired[bool]

helpattributeinstance attribute#

help: NotRequired[str | None]

help_styleattributeinstance attribute#

help_style: NotRequired[StyleType | None]

inline_help_in_titleattributeinstance attribute#

inline_help_in_title: NotRequired[bool | None]

nameattributeinstance attribute#

name: NotRequired[str]

optionsattributeinstance attribute#

options: NotRequired[list[str]]

panel_stylesattributeinstance attribute#

panel_styles: NotRequired[dict[str, Any] | None]

table_stylesattributeinstance attribute#

table_styles: NotRequired[dict[str, Any] | None]

title_styleattributeinstance attribute#

title_style: NotRequired[StyleType | None]

method_is_from_subclass_offunction#

def method_is_from_subclass_of(base_cls: type[object], method_name: str) -> bool

Check to see whether a class’s method comes from a subclass of some base class.

This is used under the hood to see whether we would expect a patched RichCommand’s help text methods to be compatible or incompatible with rich-click or not.

truthyfunction#

def truthy(o: Any) -> bool | None

Check if string or other obj is truthy.