File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -82,13 +82,11 @@ def _validate_json_input(file: str) -> t.Optional[JsonBodyT]:
8282JsonInput = 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
9492class _TransferSpeedColumn (TransferSpeedColumn ):
You can’t perform that action at this time.
0 commit comments