65
65
66
66
import rich .box
67
67
from rich .console import Group
68
- from rich .padding import Padding
69
68
from rich .rule import Rule
70
69
from rich .style import Style , StyleType
71
70
from rich .table import (
@@ -4076,9 +4075,8 @@ def do_help(self, args: argparse.Namespace) -> None:
4076
4075
# Indent doc_leader to align with the help tables.
4077
4076
self .poutput ()
4078
4077
self .poutput (
4079
- Padding .indent (self .doc_leader , 1 ),
4078
+ ru .indent (self .doc_leader , 1 ),
4080
4079
style = Cmd2Style .HELP_LEADER ,
4081
- soft_wrap = False ,
4082
4080
)
4083
4081
self .poutput ()
4084
4082
@@ -4139,13 +4137,13 @@ def print_topics(self, header: str, cmds: list[str] | None, cmdlen: int, maxcol:
4139
4137
header_grid = Table .grid ()
4140
4138
header_grid .add_row (header , style = Cmd2Style .HELP_HEADER )
4141
4139
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 ))
4143
4141
4144
4142
# Print the topics in columns.
4145
4143
# Subtract 1 from maxcol to account for indentation.
4146
4144
maxcol = min (maxcol , ru .console_width ()) - 1
4147
4145
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 ))
4149
4147
self .poutput ()
4150
4148
4151
4149
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
4160
4158
return
4161
4159
4162
4160
# 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 )
4168
4162
topics_table = Table (
4169
4163
Column ("Name" , no_wrap = True ),
4170
4164
Column ("Description" , overflow = "fold" ),
0 commit comments