From 77a9a6cd6f4531e88dbddafb3fd8aef33a575861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Prchl=C3=ADk?= Date: Wed, 1 Jul 2026 10:30:51 +0200 Subject: [PATCH] Drop BaseResult.show() method, it is no longer needed It was used by the `report/display` plugin, but we moved to nicer templates instead, releaving results from the responsibility for their own presentation. --- tmt/result.py | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/tmt/result.py b/tmt/result.py index 2dc94f8b80..2780039d21 100644 --- a/tmt/result.py +++ b/tmt/result.py @@ -213,23 +213,6 @@ class BaseResult(SerializableContainer): def __post_init__(self) -> None: self.original_result = self.result - def show(self) -> str: - """ - Return a nicely colored result with test name (and note) - """ - - result = 'errr' if self.result == ResultOutcome.ERROR else self.result.value - - components: list[str] = [ - style(result, fg=RESULT_OUTCOME_COLORS[self.result]), - self.name, - ] - - if self.note: - components.append(f'({self.printable_note})') - - return ' '.join(components) - @property def printable_note(self) -> str: return ', '.join(self.note) @@ -573,30 +556,6 @@ def summary(results: list['Result']) -> str: # FIXME: cast() - https://github.com/teemtee/fmf/issues/185 return cast(str, fmf.utils.listed(comments or ['no results found'])) - def show(self, display_guest: bool = True) -> str: - """ - Return a nicely colored result with test name (and note) - """ - - from tmt.guest import format_guest_full_name - - result = 'errr' if self.result == ResultOutcome.ERROR else self.result.value - - components: list[str] = [ - style(result, fg=RESULT_OUTCOME_COLORS[self.result]), - self.name, - ] - - if display_guest and self.guest: - assert self.guest.name # narrow type - - components.append(f'(on {format_guest_full_name(self.guest.name, self.guest.role)})') - - if self.note: - components.append(f'({self.printable_note})') - - return ' '.join(components) - @property def failure_logs(self) -> list[Path]: """