From 00a184952733167541d72fb7d64dabeb5cd44dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B0=D0=B2=D0=B5=D0=BB=20=D0=96=D1=83=D0=BA=D0=BE?= =?UTF-8?q?=D0=B2?= <33721692+LeaveMyYard@users.noreply.github.com> Date: Tue, 16 May 2023 12:17:22 +0300 Subject: [MAIN-169] Fix rich cutting long lines --- examples/custom_formatter.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'examples') diff --git a/examples/custom_formatter.py b/examples/custom_formatter.py index a091e22..d3cb98d 100644 --- a/examples/custom_formatter.py +++ b/examples/custom_formatter.py @@ -8,8 +8,14 @@ from robusta_krr.api.models import Result class CustomFormatter(BaseFormatter): + # This is the name that will be used to reference the formatter in the CLI __display_name__ = "my_formatter" + # This will pass the result to Rich Console for formatting. + # By default, the result is passed to `print` function. + # See https://rich.readthedocs.io/en/latest/ for more info + __rich_console__ = True + def format(self, result: Result) -> str: return "Custom formatter" -- cgit v1.2.3