Skip to content

Commit b3d016e

Browse files
committed
Removed unnecessary arguments in rich_text_to_string().
1 parent 25aa3e6 commit b3d016e

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
@@ -273,9 +273,6 @@ def rich_text_to_string(text: Text) -> str:
273273
force_terminal=True,
274274
soft_wrap=True,
275275
no_color=False,
276-
markup=False,
277-
emoji=False,
278-
highlight=False,
279276
theme=APP_THEME,
280277
)
281278
with console.capture() as capture:

0 commit comments

Comments
 (0)