fix missing ) on debug messages

This commit is contained in:
2026-11-13 02:39:51 +01:00
parent 4cb9cfa8fa
commit a484e2fe15
+5 -5
View File
@@ -125,7 +125,7 @@ class ThermalCapWrapper:
@property
def cap(self) -> ThermalCap:
if isinstance(self.__cap, ThermalCap): return self.__cap
raise TypeError(f"{self.__cap=} ({type(self.__cap)=} is not a ThermalCap)")
raise TypeError(f"{self.__cap=} ({type(self.__cap)=}) is not a ThermalCap)")
@cap.setter
def cap(self, value: ThermalCap | str):
@@ -264,12 +264,12 @@ class SteamTurbineWrapper:
@property
def turbine(self) -> SteamTurbine:
if isinstance(self.__turbine, SteamTurbine): return self.__turbine
raise TypeError(f"{self.__turbine=} ({type(self.__turbine)=} is not a SteamTurbine)")
raise TypeError(f"{self.__turbine=} ({type(self.__turbine)=}) is not a SteamTurbine)")
@turbine.setter
def turbine(self, value: SteamTurbine | str):
if isinstance(value, str): value = get_component(value)
if not isinstance(value, SteamTurbine): raise TypeError(f"{self.__turbine=} ({type(self.__turbine)=} is not a SteamTurbine)")
if not isinstance(value, SteamTurbine): raise TypeError(f"{self.__turbine=} ({type(self.__turbine)=}) is not a SteamTurbine)")
self.__turbine = value
@property
@@ -285,7 +285,7 @@ class SteamTurbineWrapper:
@threshold.setter
def threshold(self, value: int):
if not isinstance(value, int) or not 0 < value < 100:
warn(f"set threshold: {value=} ({type(value)=} is not a int, use {self.default_threshold=}")
warn(f"set threshold: {value=} ({type(value)=}) is not a int, use {self.default_threshold=}")
self.__threshold = self.default_threshold
return
self.__threshold = value
@@ -307,5 +307,5 @@ class SteamTurbineWrapper:
if isinstance(value, list):
self.__storages = [ s for s in value if isinstance(s, GasTank) ]
return
warn(f"set storages: given {value=} ({type(value)=} has incorrect type, use default.")
warn(f"set storages: given {value=} ({type(value)=}) has incorrect type, use default.")
self.__storages = self.get_local_storages()