Skip to content

Commit

Permalink
loggerd: typing and remove unused default arg (commaai#34349)
Browse files Browse the repository at this point in the history
  • Loading branch information
incognitojam authored Jan 9, 2025
1 parent f761f53 commit 0877994
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/loggerd/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0877994

Please sign in to comment.