diff --git a/libs/wrapper/power.py b/libs/wrapper/power.py index 9af1bf9..e3118a9 100644 --- a/libs/wrapper/power.py +++ b/libs/wrapper/power.py @@ -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()