mirror of
https://github.com/onyx-and-iris/xair-api-python.git
synced 2026-04-18 05:23:32 +00:00
remove type checks, prefer duck typing.
keep bounds checks for any vals passed to lin_set/log_set
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user