Skip to content

Commit b51bcd9

Browse files
committed
feat: release
1 parent f1c9e1e commit b51bcd9

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/esrt/cmd_base.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,11 @@ def _validate_json_input(file: str) -> t.Optional[JsonBodyT]:
8282
JsonInput = t.Annotated[JsonBodyT, PlainValidator(_validate_json_input)]
8383

8484

85-
_record_console = Console(file=io.StringIO(), record=True)
86-
87-
88-
def rich_text(*objects: t.Any, sep: str = ' ', end: str = '\n') -> str: # noqa: ANN401
85+
def rich_text(*objects: t.Any) -> str: # noqa: ANN401
8986
"""Return a string representation of the object, formatted with rich text."""
90-
_record_console.print(*objects, sep=sep, end=end) # color
91-
return _record_console.export_text(styles=True)
87+
f = io.StringIO()
88+
Console(file=f).print(*objects)
89+
return f.getvalue()
9290

9391

9492
class _TransferSpeedColumn(TransferSpeedColumn):

0 commit comments

Comments
 (0)