remove type checks, prefer duck typing.

keep bounds checks for any vals passed to lin_set/log_set
This commit is contained in:
onyx-and-iris
2022-11-08 16:54:23 +00:00
parent fb8d3dee75
commit 87217f6f9c
5 changed files with 54 additions and 148 deletions

View File

@@ -35,8 +35,6 @@ class DCA(IDCA):
@on.setter
def on(self, val: bool):
if not isinstance(val, bool):
raise XAirRemoteError("on is a boolean parameter")
self.setter("on", 1 if val else 0)
@property
@@ -45,8 +43,6 @@ class DCA(IDCA):
@name.setter
def name(self, val: str):
if not isinstance(val, str):
raise XAirRemoteError("name is a str parameter")
self.setter("config/name")[0]
@property
@@ -55,6 +51,4 @@ class DCA(IDCA):
@color.setter
def color(self, val: int):
if not isinstance(val, int):
raise XAirRemoteError("color is an int parameter")
self.setter("config/color", val)