From 3edf5959835fc28d3ed275e81e53d22fc7a00e31 Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Mon, 18 Aug 2025 10:49:40 -0600 Subject: [PATCH] Clean up the remaining uses of print() --- cista/app.py | 4 ++-- cista/util/lrucache.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cista/app.py b/cista/app.py index 4eff413..fc3691c 100644 --- a/cista/app.py +++ b/cista/app.py @@ -183,9 +183,9 @@ async def refresh_wwwroot(): for name in sorted(set(wwwold) - set(www)): changes += f"Deleted /{name}\n" if changes: - print(f"Updated wwwroot:\n{changes}", end="", flush=True) + logger.info(f"Updated wwwroot:\n{changes}", end="", flush=True) except Exception as e: - print(f"Error loading wwwroot: {e!r}") + logger.error(f"Error loading wwwroot: {e!r}") await asyncio.sleep(0.5) except asyncio.CancelledError: pass diff --git a/cista/util/lrucache.py b/cista/util/lrucache.py index 89154dd..0a18705 100644 --- a/cista/util/lrucache.py +++ b/cista/util/lrucache.py @@ -1,4 +1,5 @@ from time import monotonic +from typing import Callable class LRUCache: @@ -12,7 +13,7 @@ class LRUCache: cache (list): Internal list storing the cache items. """ - def __init__(self, open: callable, *, capacity: int, maxage: float): + def __init__(self, open: Callable, *, capacity: int, maxage: float): """ Initialize LRUCache. @@ -50,7 +51,6 @@ class LRUCache: # Add/restore to end of cache self.cache.insert(0, (key, f, monotonic())) self.expire_items() - print(self.cache) return f def expire_items(self):