From f9950d7edb6a83fa79a28b15131ae68f6756e1fc Mon Sep 17 00:00:00 2001 From: Rupert Swarbrick Date: Sat, 4 Apr 2026 21:17:40 +0100 Subject: [PATCH] revert: "Correct the type for RunMode.build_mode" This reverts commit 7bc25f651e2710e9ba14d3ce00dd6749bc4212e1. I think I intended to fix some typing problem, but the code in the "fix" was definitely wrong (causing build failures when the base class constructor doesn't set up build_mode in the way I expected). Undo the breakage (sorry). Signed-off-by: Rupert Swarbrick --- src/dvsim/modes.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/dvsim/modes.py b/src/dvsim/modes.py index e6e2623c..9f944518 100644 --- a/src/dvsim/modes.py +++ b/src/dvsim/modes.py @@ -301,6 +301,7 @@ def __init__(self, rdict) -> None: self.run_opts = [] self.uvm_test = "" self.uvm_test_seq = "" + self.build_mode = "" self.run_timeout_mins = None self.run_timeout_multiplier = None self.sw_images = [] @@ -308,14 +309,6 @@ def __init__(self, rdict) -> None: self.sw_build_opts = [] super().__init__("run mode", rdict) - - # The base class constructor should have provided a BuildMode object in - # self.build_mode. Check this at run-time. The odd assignment to - # self.build_mode is to teach pyright about the field. - if not isinstance(self.build_mode, BuildMode): - raise TypeError("build_mode not computed by constructor") - self.build_mode: BuildMode = self.build_mode - self.en_run_modes = list(set(self.en_run_modes)) def get_sub_modes(self) -> list[str]: