rich_click.utils
Attributes
| Name | Description |
|---|---|
notset | No description. |
Classes
| Name | Description |
|---|---|
CommandGroupDict | Specification for command groups. |
OptionGroupDict | Specification for option groups. |
Functions
| Name | Description |
|---|---|
method_is_from_subclass_of | Check to see whether a class's method comes from a subclass of some base class. |
truthy | Check if string or other obj is truthy. |
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) -> boolCheck 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 | NoneCheck if string or other obj is truthy.