From 5fefdce2b666bc06145cf1c3e7795d880a176f22 Mon Sep 17 00:00:00 2001 From: Thomas Grimonet Date: Fri, 5 Jul 2024 10:20:48 +0200 Subject: [PATCH] fix(anta.reporter): Define constants to manage table headers - sonarcloud --- anta/reporter/__init__.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/anta/reporter/__init__.py b/anta/reporter/__init__.py index 7c024ba99..5ec798be0 100644 --- a/anta/reporter/__init__.py +++ b/anta/reporter/__init__.py @@ -32,7 +32,7 @@ class Headers(BaseModel): """Headers for the table report.""" device: str = "Device" - test_case: str = "Test Case" + test_case: str = "Test Name" number_of_success: str = "# of success" number_of_failure: str = "# of failure" number_of_skipped: str = "# of skipped" @@ -75,9 +75,6 @@ def _build_headers(self, headers: list[str], table: Table) -> Table: for idx, header in enumerate(headers): if idx == 0: table.add_column(header, justify="left", style=RICH_COLOR_PALETTE.HEADER, no_wrap=True) - elif header == "Test Name": - # We always want the full test name - table.add_column(header, justify="left", no_wrap=True) else: table.add_column(header, justify="left") return table