summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorПавел Жуков <33721692+LeaveMyYard@users.noreply.github.com>2023-05-16 12:17:22 +0300
committerПавел Жуков <33721692+LeaveMyYard@users.noreply.github.com>2023-05-16 12:17:22 +0300
commit00a184952733167541d72fb7d64dabeb5cd44dfc (patch)
tree0512f100fe38a3ffd8928c0b90a74094cf2ca326 /examples
parenta3887611c86c2845c12af0c1e73c8240c7f512a5 (diff)
[MAIN-169] Fix rich cutting long lines
Diffstat (limited to 'examples')
-rw-r--r--examples/custom_formatter.py6
1 files changed, 6 insertions, 0 deletions
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"