From 08779941e533ce4cb36410c899b3dff3883d59fe Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Thu, 9 Jan 2025 22:12:10 +0000 Subject: [PATCH] loggerd: typing and remove unused default arg (#34349) --- system/loggerd/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/loggerd/config.py b/system/loggerd/config.py index 5c2c89b73fcf20..e1c47c768df93f 100644 --- a/system/loggerd/config.py +++ b/system/loggerd/config.py @@ -9,7 +9,7 @@ STATS_SOCKET = "ipc:///tmp/stats" STATS_FLUSH_TIME_S = 60 -def get_available_percent(default=None): +def get_available_percent(default: float) -> float: try: statvfs = os.statvfs(Paths.log_root()) available_percent = 100.0 * statvfs.f_bavail / statvfs.f_blocks @@ -19,7 +19,7 @@ def get_available_percent(default=None): return available_percent -def get_available_bytes(default=None): +def get_available_bytes(default: int) -> int: try: statvfs = os.statvfs(Paths.log_root()) available_bytes = statvfs.f_bavail * statvfs.f_frsize