diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/custom_formatter.py | 6 |
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" |
