IQ.Pilot Release Commit @ 6d177d4

This commit is contained in:
IQ.Lvbs CI [bot]
2026-07-22 23:21:13 -05:00
parent ff4dfcb728
commit 401cac1028
93 changed files with 9223 additions and 4600 deletions

View File

@@ -64,6 +64,14 @@ except ImportError:
except (FileNotFoundError, NotADirectoryError, IsADirectoryError):
return False
def get_int(self, key, block: bool = False) -> int:
value = self.get(key, block=block)
return int(value) if value else 0
def get_float(self, key, block: bool = False) -> float:
value = self.get(key, block=block)
return float(value) if value else 0.0
def put(self, key, dat):
if isinstance(dat, str):
dat = dat.encode("utf-8")
@@ -80,12 +88,24 @@ except ImportError:
def put_bool(self, key, val: bool):
self.put(key, b"1" if val else b"0")
def put_int(self, key, val: int):
self.put(key, str(val))
def put_float(self, key, val: float):
self.put(key, str(val))
def put_nonblocking(self, key, dat):
self.put(key, dat)
def put_bool_nonblocking(self, key, val: bool):
self.put_bool(key, val)
def put_int_nonblocking(self, key, val: int):
self.put_int(key, val)
def put_float_nonblocking(self, key, val: float):
self.put_float(key, val)
def remove(self, key):
try:
os.remove(self._p(key))