rich_click.rich_help_configuration
Attributes
| Name | Description |
|---|---|
ColumnType | No description. |
CommandColumnType | No description. |
CommandHelpSectionType | No description. |
FROM_THEME | No description. |
OptionColumnType | No description. |
OptionHelpSectionType | No description. |
T | No description. |
Classes
| Name | Description |
|---|---|
FromTheme | Sentinel value for unset config options. |
RichHelpConfiguration | Rich Help Configuration class. |
Functions
| Name | Description |
|---|---|
force_terminal_default | Use as the default factory for force_terminal. |
terminal_width_default | Use as the default factory for width and max_width. |
ColumnTypeattributemodule attribute#
ColumnType = OptionColumnType | CommandColumnType | strCommandColumnTypeattributemodule attribute#
CommandColumnType = Literal['name', 'aliases', 'name_with_aliases', 'help']CommandHelpSectionTypeattributemodule attribute#
CommandHelpSectionType = Literal['aliases', 'help', 'deprecated']FROM_THEMEattributemodule attribute#
FROM_THEME: Any = FromTheme(default='default-box')OptionColumnTypeattributemodule attribute#
OptionColumnType = Literal[
'required',
'opt_primary',
'opt_secondary',
'opt_long',
'opt_short',
'opt_all',
'opt_all_metavar',
'opt_long_metavar',
'metavar',
'metavar_short',
'help'
]OptionHelpSectionTypeattributemodule attribute#
OptionHelpSectionType = Literal[
'help',
'required',
'envvar',
'default',
'range',
'metavar',
'metavar_short',
'deprecated'
]Tattributemodule attribute#
T = TypeVar('T', bound='RichHelpConfiguration')FromThemeclass#
class FromTheme(default: str)Sentinel value for unset config options.
Initialize a default.
RichHelpConfigurationclassdataclass#
class RichHelpConfiguration(theme: str | RichClickTheme | None = None, enable_theme_env_var: bool = True, style_option: StyleType = FROM_THEME, style_option_negative: StyleType | None = FROM_THEME, style_argument: StyleType = FROM_THEME, style_command: StyleType = FROM_THEME, style_command_aliases: StyleType = FROM_THEME, style_switch: StyleType = FROM_THEME, style_switch_negative: StyleType | None = FROM_THEME, style_metavar: StyleType = FROM_THEME, style_metavar_append: StyleType = FROM_THEME, style_metavar_separator: StyleType = FROM_THEME, style_range_append: StyleType = FROM_THEME, style_header_text: StyleType = FROM_THEME, style_epilog_text: StyleType = FROM_THEME, style_footer_text: StyleType = FROM_THEME, style_usage: StyleType = FROM_THEME, style_usage_command: StyleType = FROM_THEME, style_usage_separator: StyleType = FROM_THEME, style_deprecated: StyleType = FROM_THEME, style_helptext_first_line: StyleType = FROM_THEME, style_helptext: StyleType = FROM_THEME, style_helptext_aliases: StyleType | None = None, style_option_help: StyleType = FROM_THEME, style_command_help: StyleType = FROM_THEME, style_option_default: StyleType = FROM_THEME, style_option_envvar: StyleType = FROM_THEME, style_required_short: StyleType = FROM_THEME, style_required_long: StyleType = FROM_THEME, style_options_panel_border: StyleType = FROM_THEME, style_options_panel_box: str | Box | None = FROM_THEME, style_options_panel_help_style: StyleType = FROM_THEME, style_options_panel_title_style: StyleType = FROM_THEME, style_options_panel_padding: PaddingDimensions = FROM_THEME, style_options_panel_style: StyleType = FROM_THEME, align_options_panel: AlignMethod = 'left', style_options_table_show_lines: bool = False, style_options_table_leading: int = 0, style_options_table_pad_edge: bool = False, style_options_table_padding: PaddingDimensions = lambda : (0, 1)(), style_options_table_expand: bool = FROM_THEME, style_options_table_box: str | Box | None = FROM_THEME, style_options_table_row_styles: list[StyleType] | None = None, style_options_table_border_style: StyleType | None = FROM_THEME, style_commands_panel_border: StyleType = FROM_THEME, panel_inline_help_in_title: bool = FROM_THEME, panel_inline_help_delimiter: str = FROM_THEME, style_commands_panel_box: str | Box | None = FROM_THEME, style_commands_panel_help_style: StyleType = FROM_THEME, style_commands_panel_title_style: StyleType = FROM_THEME, style_commands_panel_padding: PaddingDimensions = FROM_THEME, style_commands_panel_style: StyleType = FROM_THEME, align_commands_panel: AlignMethod = 'left', style_commands_table_show_lines: bool = False, style_commands_table_leading: int = 0, style_commands_table_pad_edge: bool = False, style_commands_table_padding: PaddingDimensions = lambda : (0, 1)(), style_commands_table_expand: bool = FROM_THEME, style_commands_table_box: str | Box | None = FROM_THEME, style_commands_table_row_styles: list[StyleType] | None = None, style_commands_table_border_style: StyleType | None = FROM_THEME, style_commands_table_column_width_ratio: tuple[None, None] | tuple[int, int] | None = lambda : (None, None)(), style_errors_panel_border: StyleType = FROM_THEME, style_errors_panel_box: str | Box | None = FROM_THEME, align_errors_panel: AlignMethod = 'left', style_errors_suggestion: StyleType | None = None, style_errors_suggestion_command: StyleType | None = None, style_padding_errors: StyleType = FROM_THEME, style_aborted: StyleType = 'red', style_padding_usage: StyleType = FROM_THEME, style_padding_helptext: StyleType = FROM_THEME, style_padding_epilog: StyleType = FROM_THEME, panel_title_padding: int = FROM_THEME, width: int | None = terminal_width_default(), max_width: int | None = terminal_width_default(), color_system: Literal['auto', 'standard', '256', 'truecolor', 'windows'] | None = 'auto', force_terminal: bool | None = force_terminal_default(), options_table_column_types: list[OptionColumnType] = FROM_THEME, commands_table_column_types: list[CommandColumnType] = FROM_THEME, options_table_help_sections: list[OptionHelpSectionType] = FROM_THEME, commands_table_help_sections: list[CommandHelpSectionType] = FROM_THEME, header_text: str | Text | None = None, footer_text: str | Text | None = None, panel_title_string: str = FROM_THEME, deprecated_string: str = FROM_THEME, deprecated_with_reason_string: str = FROM_THEME, default_string: str = FROM_THEME, envvar_string: str = FROM_THEME, required_short_string: str = FROM_THEME, required_long_string: str = FROM_THEME, range_string: str = FROM_THEME, append_metavars_help_string: str = FROM_THEME, append_range_help_string: str = FROM_THEME, helptext_aliases_string: str = 'Aliases: {}', arguments_panel_title: str = 'Arguments', options_panel_title: str = 'Options', commands_panel_title: str = 'Commands', errors_panel_title: str = 'Error', delimiter_comma: str = FROM_THEME, delimiter_slash: str = FROM_THEME, errors_suggestion: str | Text | None = None, errors_epilogue: str | Text | None = None, aborted_text: str = 'Aborted.', padding_header_text: PaddingDimensions = FROM_THEME, padding_usage: PaddingDimensions = FROM_THEME, padding_helptext: PaddingDimensions = FROM_THEME, padding_helptext_deprecated: PaddingDimensions = 0, padding_helptext_first_line: PaddingDimensions = 0, padding_epilog: PaddingDimensions = FROM_THEME, padding_footer_text: PaddingDimensions = FROM_THEME, padding_errors_panel: PaddingDimensions = (0, 0, 1, 0), padding_errors_suggestion: PaddingDimensions = (0, 1, 0, 1), padding_errors_epilogue: PaddingDimensions = (0, 1, 1, 1), show_arguments: bool | None = None, show_metavars_column: bool | None = None, commands_before_options: bool = False, default_panels_first: bool = False, append_metavars_help: bool | None = None, group_arguments_options: bool = False, option_envvar_first: bool | None = None, text_markup: Literal['ansi', 'rich', 'markdown', 'rst', None] = notset, text_kwargs: dict[str, Any] | None = None, text_paragraph_linebreaks: Literal['\n', '\n\n'] | None = None, text_emojis: bool = notset, use_markdown: bool | None = None, use_markdown_emoji: bool | None = None, use_rich_markup: bool | None = None, command_groups: dict[str, list[CommandGroupDict]] = lambda : {}(), option_groups: dict[str, list[OptionGroupDict]] = lambda : {}(), use_click_short_help: bool = False, helptext_show_aliases: bool = True, highlighter: Highlighter | None = None, highlighter_patterns: list[str] = lambda : ['(^|[^\\w\\-])(?P<switch>-([^\\W0-9][\\w\\-]*\\w|[^\\W0-9]))', '(^|[^\\w\\-])(?P<option>--([^\\W0-9][\\w\\-]*\\w|[^\\W0-9]))', '(?P<metavar><[^>]+>)', '(?P<deprecated>\\(DEPRECATED(?:\\: .*?)?\\))$'](), legacy_windows: bool | None = None)Rich Help Configuration class.
When merging multiple RichHelpConfigurations together, user-defined values always take precedence over the class’s defaults. When there are multiple user-defined values for a given field, the right-most field is used.
aborted_textattributeclass attributeinstance attribute#
aborted_text: str = field(default='Aborted.')align_commands_panelattributeclass attributeinstance attribute#
align_commands_panel: AlignMethod = field(default='left')align_errors_panelattributeclass attributeinstance attribute#
align_errors_panel: AlignMethod = field(default='left')align_options_panelattributeclass attributeinstance attribute#
align_options_panel: AlignMethod = field(default='left')append_metavars_helpattributeclass attributeinstance attribute#
append_metavars_help: bool | None = field(default=None)Append metavar (eg. [TEXT]) after the help text
append_metavars_help_stringattributeclass attributeinstance attribute#
append_metavars_help_string: str = field(default=FROM_THEME)append_range_help_stringattributeclass attributeinstance attribute#
append_range_help_string: str = field(default=FROM_THEME)arguments_panel_titleattributeclass attributeinstance attribute#
arguments_panel_title: str = field(default='Arguments')color_systemattributeclass attributeinstance attribute#
color_system: Literal['auto', 'standard', '256', 'truecolor', 'windows'] | None = field(default='auto')command_groupsattributeclass attributeinstance attribute#
command_groups: dict[str, list[CommandGroupDict]] = field(default_factory=lambda : {})Define sorted groups of panels to display subcommands
commands_before_optionsattributeclass attributeinstance attribute#
commands_before_options: bool = field(default=False)If set, the commands panel show above the options panel.
commands_panel_titleattributeclass attributeinstance attribute#
commands_panel_title: str = field(default='Commands')commands_table_column_typesattributeclass attributeinstance attribute#
commands_table_column_types: list[CommandColumnType] = field(default=FROM_THEME)commands_table_help_sectionsattributeclass attributeinstance attribute#
commands_table_help_sections: list[CommandHelpSectionType] = field(default=FROM_THEME)default_panels_firstattributeclass attributeinstance attribute#
default_panels_first: bool = field(default=False)If set, default panels appear before custom panels of the same type.
default_stringattributeclass attributeinstance attribute#
default_string: str = field(default=FROM_THEME)delimiter_commaattributeclass attributeinstance attribute#
delimiter_comma: str = field(default=FROM_THEME)delimiter_slashattributeclass attributeinstance attribute#
delimiter_slash: str = field(default=FROM_THEME)deprecated_stringattributeclass attributeinstance attribute#
deprecated_string: str = field(default=FROM_THEME)deprecated_with_reason_stringattributeclass attributeinstance attribute#
deprecated_with_reason_string: str = field(default=FROM_THEME)enable_theme_env_varattributeclass attributeinstance attribute#
enable_theme_env_var: bool = field(default=True)envvar_stringattributeclass attributeinstance attribute#
envvar_string: str = field(default=FROM_THEME)errors_epilogueattributeclass attributeinstance attribute#
errors_epilogue: str | Text | None = field(default=None)errors_panel_titleattributeclass attributeinstance attribute#
errors_panel_title: str = field(default='Error')errors_suggestionattributeclass attributeinstance attribute#
errors_suggestion: str | Text | None = field(default=None)Defaults to Try ‘cmd -h’ for help. Set to False to disable.
footer_textattributeclass attributeinstance attribute#
footer_text: str | Text | None = field(default=None)force_terminalattributeclass attributeinstance attribute#
force_terminal: bool | None = field(default_factory=force_terminal_default)group_arguments_optionsattributeclass attributeinstance attribute#
group_arguments_options: bool = field(default=False)Show arguments with options instead of in own panel
header_textattributeclass attributeinstance attribute#
header_text: str | Text | None = field(default=None)helptext_aliases_stringattributeclass attributeinstance attribute#
helptext_aliases_string: str = field(default='Aliases: {}')helptext_show_aliasesattributeclass attributeinstance attribute#
helptext_show_aliases: bool = field(default=True)highlighterattributeclass attributeinstance attribute#
highlighter: Highlighter | None = field(default=None, repr=False, compare=False)(Deprecated) Rich regex highlighter for help highlighting
highlighter_patternsattributeclass attributeinstance attribute#
highlighter_patterns: list[str] = field(
default_factory=lambda : [
'(^|[^\\w\\-])(?P<switch>-([^\\W0-9][\\w\\-]*\\w|[^\\W0-9]))',
'(^|[^\\w\\-])(?P<option>--([^\\W0-9][\\w\\-]*\\w|[^\\W0-9]))',
'(?P<metavar><[^>]+>)',
'(?P<deprecated>\\(DEPRECATED(?:\\: .*?)?\\))$'
]
)Patterns to use with the option highlighter.
legacy_windowsattributeclass attributeinstance attribute#
legacy_windows: bool | None = field(default=None)max_widthattributeclass attributeinstance attribute#
max_width: int | None = field(default_factory=terminal_width_default)option_envvar_firstattributeclass attributeinstance attribute#
option_envvar_first: bool | None = field(default=None)Show env vars before option help text instead of after
option_groupsattributeclass attributeinstance attribute#
option_groups: dict[str, list[OptionGroupDict]] = field(default_factory=lambda : {})Define sorted groups of panels to display options and arguments
options_panel_titleattributeclass attributeinstance attribute#
options_panel_title: str = field(default='Options')options_table_column_typesattributeclass attributeinstance attribute#
options_table_column_types: list[OptionColumnType] = field(default=FROM_THEME)options_table_help_sectionsattributeclass attributeinstance attribute#
options_table_help_sections: list[OptionHelpSectionType] = field(default=FROM_THEME)padding_epilogattributeclass attributeinstance attribute#
padding_epilog: PaddingDimensions = field(default=FROM_THEME)padding_errors_epilogueattributeclass attributeinstance attribute#
padding_errors_epilogue: PaddingDimensions = field(default=(0, 1, 1, 1))padding_errors_panelattributeclass attributeinstance attribute#
padding_errors_panel: PaddingDimensions = field(default=(0, 0, 1, 0))padding_errors_suggestionattributeclass attributeinstance attribute#
padding_errors_suggestion: PaddingDimensions = field(default=(0, 1, 0, 1))padding_footer_textattributeclass attributeinstance attribute#
padding_footer_text: PaddingDimensions = field(default=FROM_THEME)padding_header_textattributeclass attributeinstance attribute#
padding_header_text: PaddingDimensions = field(default=FROM_THEME)padding_helptextattributeclass attributeinstance attribute#
padding_helptext: PaddingDimensions = field(default=FROM_THEME)padding_helptext_deprecatedattributeclass attributeinstance attribute#
padding_helptext_deprecated: PaddingDimensions = field(default=0)padding_helptext_first_lineattributeclass attributeinstance attribute#
padding_helptext_first_line: PaddingDimensions = field(default=0)padding_usageattributeclass attributeinstance attribute#
padding_usage: PaddingDimensions = field(default=FROM_THEME)panel_inline_help_delimiterattributeclass attributeinstance attribute#
panel_inline_help_delimiter: str = field(default=FROM_THEME)panel_inline_help_in_titleattributeclass attributeinstance attribute#
panel_inline_help_in_title: bool = field(default=FROM_THEME)panel_title_paddingattributeclass attributeinstance attribute#
panel_title_padding: int = field(default=FROM_THEME)panel_title_stringattributeclass attributeinstance attribute#
panel_title_string: str = field(default=FROM_THEME)range_stringattributeclass attributeinstance attribute#
range_string: str = field(default=FROM_THEME)required_long_stringattributeclass attributeinstance attribute#
required_long_string: str = field(default=FROM_THEME)required_short_stringattributeclass attributeinstance attribute#
required_short_string: str = field(default=FROM_THEME)show_argumentsattributeclass attributeinstance attribute#
show_arguments: bool | None = field(default=None)Show positional arguments
show_metavars_columnattributeclass attributeinstance attribute#
show_metavars_column: bool | None = field(default=None)Show a column with the option metavar (eg. INTEGER)
style_abortedattributeclass attributeinstance attribute#
style_aborted: StyleType = field(default='red')style_argumentattributeclass attributeinstance attribute#
style_argument: StyleType = field(default=FROM_THEME)style_commandattributeclass attributeinstance attribute#
style_command: StyleType = field(default=FROM_THEME)style_command_aliasesattributeclass attributeinstance attribute#
style_command_aliases: StyleType = field(default=FROM_THEME)style_command_helpattributeclass attributeinstance attribute#
style_command_help: StyleType = field(default=FROM_THEME)style_commands_panel_borderattributeclass attributeinstance attribute#
style_commands_panel_border: StyleType = field(default=FROM_THEME)style_commands_panel_boxattributeclass attributeinstance attribute#
style_commands_panel_box: str | Box | None = field(default=FROM_THEME)style_commands_panel_help_styleattributeclass attributeinstance attribute#
style_commands_panel_help_style: StyleType = field(default=FROM_THEME)style_commands_panel_paddingattributeclass attributeinstance attribute#
style_commands_panel_padding: PaddingDimensions = field(default=FROM_THEME)style_commands_panel_styleattributeclass attributeinstance attribute#
style_commands_panel_style: StyleType = field(default=FROM_THEME)style_commands_panel_title_styleattributeclass attributeinstance attribute#
style_commands_panel_title_style: StyleType = field(default=FROM_THEME)style_commands_table_border_styleattributeclass attributeinstance attribute#
style_commands_table_border_style: StyleType | None = field(default=FROM_THEME)style_commands_table_boxattributeclass attributeinstance attribute#
style_commands_table_box: str | Box | None = field(default=FROM_THEME)style_commands_table_column_width_ratioattributeclass attributeinstance attribute#
style_commands_table_column_width_ratio: tuple[None, None] | tuple[int, int] | None = field(default_factory=lambda : (None, None))style_commands_table_expandattributeclass attributeinstance attribute#
style_commands_table_expand: bool = field(default=FROM_THEME)style_commands_table_leadingattributeclass attributeinstance attribute#
style_commands_table_leading: int = field(default=0)style_commands_table_pad_edgeattributeclass attributeinstance attribute#
style_commands_table_pad_edge: bool = field(default=False)style_commands_table_paddingattributeclass attributeinstance attribute#
style_commands_table_padding: PaddingDimensions = field(default_factory=lambda : (0, 1))style_commands_table_row_stylesattributeclass attributeinstance attribute#
style_commands_table_row_styles: list[StyleType] | None = field(default=None)style_commands_table_show_linesattributeclass attributeinstance attribute#
style_commands_table_show_lines: bool = field(default=False)style_deprecatedattributeclass attributeinstance attribute#
style_deprecated: StyleType = field(default=FROM_THEME)style_epilog_textattributeclass attributeinstance attribute#
style_epilog_text: StyleType = field(default=FROM_THEME)style_errors_panel_borderattributeclass attributeinstance attribute#
style_errors_panel_border: StyleType = field(default=FROM_THEME)style_errors_panel_boxattributeclass attributeinstance attribute#
style_errors_panel_box: str | Box | None = field(default=FROM_THEME)style_errors_suggestionattributeclass attributeinstance attribute#
style_errors_suggestion: StyleType | None = field(default=None)style_errors_suggestion_commandattributeclass attributeinstance attribute#
style_errors_suggestion_command: StyleType | None = field(default=None)style_footer_textattributeclass attributeinstance attribute#
style_footer_text: StyleType = field(default=FROM_THEME)style_header_textattributeclass attributeinstance attribute#
style_header_text: StyleType = field(default=FROM_THEME)style_helptextattributeclass attributeinstance attribute#
style_helptext: StyleType = field(default=FROM_THEME)style_helptext_aliasesattributeclass attributeinstance attribute#
style_helptext_aliases: StyleType | None = field(default=None)style_helptext_first_lineattributeclass attributeinstance attribute#
style_helptext_first_line: StyleType = field(default=FROM_THEME)style_metavarattributeclass attributeinstance attribute#
style_metavar: StyleType = field(default=FROM_THEME)style_metavar_appendattributeclass attributeinstance attribute#
style_metavar_append: StyleType = field(default=FROM_THEME)style_metavar_separatorattributeclass attributeinstance attribute#
style_metavar_separator: StyleType = field(default=FROM_THEME)style_optionattributeclass attributeinstance attribute#
style_option: StyleType = field(default=FROM_THEME)style_option_defaultattributeclass attributeinstance attribute#
style_option_default: StyleType = field(default=FROM_THEME)style_option_envvarattributeclass attributeinstance attribute#
style_option_envvar: StyleType = field(default=FROM_THEME)style_option_helpattributeclass attributeinstance attribute#
style_option_help: StyleType = field(default=FROM_THEME)style_option_negativeattributeclass attributeinstance attribute#
style_option_negative: StyleType | None = field(default=FROM_THEME)style_options_panel_borderattributeclass attributeinstance attribute#
style_options_panel_border: StyleType = field(default=FROM_THEME)style_options_panel_boxattributeclass attributeinstance attribute#
style_options_panel_box: str | Box | None = field(default=FROM_THEME)style_options_panel_help_styleattributeclass attributeinstance attribute#
style_options_panel_help_style: StyleType = field(default=FROM_THEME)style_options_panel_paddingattributeclass attributeinstance attribute#
style_options_panel_padding: PaddingDimensions = field(default=FROM_THEME)style_options_panel_styleattributeclass attributeinstance attribute#
style_options_panel_style: StyleType = field(default=FROM_THEME)style_options_panel_title_styleattributeclass attributeinstance attribute#
style_options_panel_title_style: StyleType = field(default=FROM_THEME)style_options_table_border_styleattributeclass attributeinstance attribute#
style_options_table_border_style: StyleType | None = field(default=FROM_THEME)style_options_table_boxattributeclass attributeinstance attribute#
style_options_table_box: str | Box | None = field(default=FROM_THEME)style_options_table_expandattributeclass attributeinstance attribute#
style_options_table_expand: bool = field(default=FROM_THEME)style_options_table_leadingattributeclass attributeinstance attribute#
style_options_table_leading: int = field(default=0)style_options_table_pad_edgeattributeclass attributeinstance attribute#
style_options_table_pad_edge: bool = field(default=False)style_options_table_paddingattributeclass attributeinstance attribute#
style_options_table_padding: PaddingDimensions = field(default_factory=lambda : (0, 1))style_options_table_row_stylesattributeclass attributeinstance attribute#
style_options_table_row_styles: list[StyleType] | None = field(default=None)style_options_table_show_linesattributeclass attributeinstance attribute#
style_options_table_show_lines: bool = field(default=False)style_padding_epilogattributeclass attributeinstance attribute#
style_padding_epilog: StyleType = field(default=FROM_THEME)style_padding_errorsattributeclass attributeinstance attribute#
style_padding_errors: StyleType = field(default=FROM_THEME)style_padding_helptextattributeclass attributeinstance attribute#
style_padding_helptext: StyleType = field(default=FROM_THEME)style_padding_usageattributeclass attributeinstance attribute#
style_padding_usage: StyleType = field(default=FROM_THEME)style_range_appendattributeclass attributeinstance attribute#
style_range_append: StyleType = field(default=FROM_THEME)style_required_longattributeclass attributeinstance attribute#
style_required_long: StyleType = field(default=FROM_THEME)style_required_shortattributeclass attributeinstance attribute#
style_required_short: StyleType = field(default=FROM_THEME)style_switchattributeclass attributeinstance attribute#
style_switch: StyleType = field(default=FROM_THEME)style_switch_negativeattributeclass attributeinstance attribute#
style_switch_negative: StyleType | None = field(default=FROM_THEME)style_usageattributeclass attributeinstance attribute#
style_usage: StyleType = field(default=FROM_THEME)style_usage_commandattributeclass attributeinstance attribute#
style_usage_command: StyleType = field(default=FROM_THEME)style_usage_separatorattributeclass attributeinstance attribute#
style_usage_separator: StyleType = field(default=FROM_THEME)text_emojisattributeclass attributeinstance attribute#
text_emojis: bool = field(default=notset)If set, parse emoji codes and replace with actual emojis, e.g. :smiley_cat: -> 😺
text_kwargsattributeclass attributeinstance attribute#
text_kwargs: dict[str, Any] | None = field(default=None)Additional kwargs to pass to Rich text rendering. Kwargs differ by text_markup chosen.
text_markupattributeclass attributeinstance attribute#
text_markup: Literal['ansi', 'rich', 'markdown', 'rst', None] = field(default=notset)What engine to use to render the text. Default is ‘ansi’.
text_paragraph_linebreaksattributeclass attributeinstance attribute#
text_paragraph_linebreaks: Literal['\n', '\n\n'] | None = field(default=None)themeattributeclass attributeinstance attribute#
theme: str | RichClickTheme | None = field(default=None)use_click_short_helpattributeclass attributeinstance attribute#
use_click_short_help: bool = field(default=False)Use click’s default function to truncate help text
use_markdownattributeclass attributeinstance attribute#
use_markdown: bool | None = field(default=None)Silently deprecated; use text_markup field instead.
use_markdown_emojiattributeclass attributeinstance attribute#
use_markdown_emoji: bool | None = field(default=None)Silently deprecated; use text_emojis instead.
use_rich_markupattributeclass attributeinstance attribute#
use_rich_markup: bool | None = field(default=None)Silently deprecated; use text_markup field instead.
widthattributeclass attributeinstance attribute#
width: int | None = field(default_factory=terminal_width_default)apply_thememethod#
def apply_theme(force_default: bool = False) -> Nonedump_to_globalsmethod#
def dump_to_globals(module: ModuleType | None = None) -> Noneload_from_globalsmethodclassmethod#
def load_from_globals(module: ModuleType | None = None, **extra: Any) -> RichHelpConfigurationBuild a RichHelpConfiguration from globals in rich_click.rich_click.
When building from globals, all fields are treated as having been set by the user, meaning they will overwrite other fields when “merged”.
to_thememethod#
def to_theme(**kwargs: Any) -> RichClickTheme