6565
6666import rich .box
6767from rich .console import Group
68- from rich .padding import Padding
6968from rich .rule import Rule
7069from rich .style import Style , StyleType
7170from rich .table import (
@@ -4076,9 +4075,8 @@ def do_help(self, args: argparse.Namespace) -> None:
40764075 # Indent doc_leader to align with the help tables.
40774076 self .poutput ()
40784077 self .poutput (
4079- Padding .indent (self .doc_leader , 1 ),
4078+ ru .indent (self .doc_leader , 1 ),
40804079 style = Cmd2Style .HELP_LEADER ,
4081- soft_wrap = False ,
40824080 )
40834081 self .poutput ()
40844082
@@ -4139,13 +4137,13 @@ def print_topics(self, header: str, cmds: list[str] | None, cmdlen: int, maxcol:
41394137 header_grid = Table .grid ()
41404138 header_grid .add_row (header , style = Cmd2Style .HELP_HEADER )
41414139 header_grid .add_row (Rule (characters = self .ruler , style = Cmd2Style .TABLE_BORDER ))
4142- self .poutput (Padding .indent (header_grid , 1 ))
4140+ self .poutput (ru .indent (header_grid , 1 ))
41434141
41444142 # Print the topics in columns.
41454143 # Subtract 1 from maxcol to account for indentation.
41464144 maxcol = min (maxcol , ru .console_width ()) - 1
41474145 columnized_cmds = self .render_columns (cmds , maxcol )
4148- self .poutput (Padding .indent (columnized_cmds , 1 ), soft_wrap = False )
4146+ self .poutput (ru .indent (columnized_cmds , 1 ))
41494147 self .poutput ()
41504148
41514149 def _print_documented_command_topics (self , header : str , cmds : list [str ], verbose : bool ) -> None :
@@ -4160,11 +4158,7 @@ def _print_documented_command_topics(self, header: str, cmds: list[str], verbose
41604158 return
41614159
41624160 # Indent header to align with the help tables.
4163- self .poutput (
4164- Padding .indent (header , 1 ),
4165- style = Cmd2Style .HELP_HEADER ,
4166- soft_wrap = False ,
4167- )
4161+ self .poutput (ru .indent (header , 1 ), style = Cmd2Style .HELP_HEADER )
41684162 topics_table = Table (
41694163 Column ("Name" , no_wrap = True ),
41704164 Column ("Description" , overflow = "fold" ),
0 commit comments