From a431102239b2cd376335cff85413a439f3e60e81 Mon Sep 17 00:00:00 2001 From: Rupert Swarbrick Date: Thu, 21 May 2026 09:44:13 +0100 Subject: [PATCH] refactor: Remove some formatting methods in dvsim.testplan I'm pretty certain these aren't used anywhere any more. I think the equivalent of the code that used to use them now consumes classes from dvsim.sim.data (and formats the results in a different place from the representation of the data, which is quite an improvement). Signed-off-by: Rupert Swarbrick --- src/dvsim/testplan.py | 36 ------------------------------------ 1 file changed, 36 deletions(-) diff --git a/src/dvsim/testplan.py b/src/dvsim/testplan.py index dee1a95a..5837f224 100644 --- a/src/dvsim/testplan.py +++ b/src/dvsim/testplan.py @@ -67,11 +67,6 @@ def __init__(self, raw_dict) -> None: # Verify things are in order. self._validate() - def __str__(self) -> str: - # Reindent the multiline desc with 4 spaces. - desc = "\n".join([" " + line.lstrip() for line in self.desc.split("\n")]) - return f" {self.kind.capitalize()}: {self.name}\n Description:\n{desc}\n" - def _validate(self) -> None: """Runs some basic consistency checks.""" if not self.name: @@ -155,9 +150,6 @@ def __init__(self, raw_dict) -> None: if self.tests == ["N/A"]: self.not_mapped = True - def __str__(self) -> str: - return super().__str__() + (f" Stage: {self.stage}\n Tests: {self.tests}\n") - def _validate(self) -> None: super()._validate() if self.stage not in Testpoint.stages: @@ -295,34 +287,6 @@ def _get_percentage(value, total) -> str: perc = value / total * 100 * 1.0 return f"{round(perc, 2):.2f} %" - @staticmethod - def get_dv_style_css() -> str: - """Returns text with HTML CSS style for a table.""" - return ( - "\n" - ) - - def __str__(self) -> str: - lines = [f"Name: {self.name}\n"] - lines += ["Testpoints:"] - lines += [f"{t}" for t in self.testpoints] - lines += ["Covergroups:"] - lines += [f"{c}" for c in self.covergroups] - return "\n".join(lines) - def __init__(self, filename, repo_top=None, name=None) -> None: """Initialize the testplan.