remove type check, prefer duck typing

This commit is contained in:
onyx-and-iris 2022-07-04 16:22:25 +01:00
parent 4751a18700
commit 3711524f88

View File

@ -35,15 +35,11 @@ class Command(IRemote):
return "Command"
def set_showvbanchat(self, val: bool):
if not isinstance(val, bool) and val not in (0, 1):
raise VMCMDErrors("showvbanchat is a boolean parameter")
self.setter("DialogShow.VBANCHAT", 1 if val else 0)
showvbanchat = property(fset=set_showvbanchat)
def set_lock(self, val: bool):
if not isinstance(val, bool) and val not in (0, 1):
raise VMCMDErrors("lock is a boolean parameter")
self.setter("lock", 1 if val else 0)
lock = property(fset=set_lock)