Skip to content

Commit 443fddc

Browse files
authored
Removed unnecessary arguments in rich_text_to_string(). (#1597)
1 parent 78eb813 commit 443fddc

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

cmd2/argparse_custom.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1361,10 +1361,10 @@ def error(self, message: str) -> NoReturn:
13611361

13621362
self.print_usage(sys.stderr)
13631363

1364-
# Add error style to message
1364+
# Use console to add style since it will respect ALLOW_STYLE's value
13651365
console = self._get_formatter().console
13661366
with console.capture() as capture:
1367-
console.print(formatted_message, style=Cmd2Style.ERROR, crop=False)
1367+
console.print(formatted_message, style=Cmd2Style.ERROR)
13681368
formatted_message = f"{capture.get()}"
13691369

13701370
self.exit(2, f'{formatted_message}\n')

cmd2/rich_utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,6 @@ def rich_text_to_string(text: Text) -> str:
414414
force_terminal=True,
415415
soft_wrap=True,
416416
no_color=False,
417-
markup=False,
418-
emoji=False,
419-
highlight=False,
420417
theme=APP_THEME,
421418
)
422419
with console.capture() as capture:

0 commit comments

Comments
 (0)