Skip to content

Commit 66b15ab

Browse files
committed
Updated comments.
1 parent 61aa696 commit 66b15ab

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

cmd2/argparse_custom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def __init__(self, value: object, descriptive_data: Sequence[Any], *args: Any) -
398398
# Make sure all objects are renderable by a Rich table.
399399
renderable_data = [obj if is_renderable(obj) else str(obj) for obj in descriptive_data]
400400

401-
# Convert objects with ANSI escape sequences to Rich Text for correct display width.
401+
# Convert strings containing ANSI style sequences into Rich Text objects for correct display width.
402402
self.descriptive_data = ru.prepare_objects_for_rendering(*renderable_data)
403403

404404
# Save the original value to support CompletionItems as argparse choices.

cmd2/cmd2.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,12 +1191,12 @@ def _completion_supported(self) -> bool:
11911191

11921192
@property
11931193
def visible_prompt(self) -> str:
1194-
"""Read-only property to get the visible prompt with any ANSI style escape codes stripped.
1194+
"""Read-only property to get the visible prompt with any ANSI style sequences stripped.
11951195
1196-
Used by transcript testing to make it easier and more reliable when users are doing things like coloring the
1197-
prompt using ANSI color codes.
1196+
Used by transcript testing to make it easier and more reliable when users are doing things like
1197+
coloring the prompt.
11981198
1199-
:return: prompt stripped of any ANSI escape codes
1199+
:return: the stripped prompt.
12001200
"""
12011201
return su.strip_style(self.prompt)
12021202

@@ -4214,7 +4214,7 @@ def _print_documented_command_topics(self, header: str, cmds: list[str], verbose
42144214
def render_columns(self, str_list: list[str] | None, display_width: int = 80) -> str:
42154215
"""Render a list of single-line strings as a compact set of columns.
42164216
4217-
This method correctly handles strings containing ANSI escape codes and
4217+
This method correctly handles strings containing ANSI style sequences and
42184218
full-width characters (like those used in CJK languages). Each column is
42194219
only as wide as necessary and columns are separated by two spaces.
42204220

0 commit comments

Comments
 (0)