refactor(code): clean up import statements, improve docstrings, and update error handling across various modules

This commit is contained in:
Ivan committed 2026-04-14 19:31:48 -05:00
1 parent 2e043ec1c2
commit 33db12b971
22 files changed
+142 -98

No files matched your search

@@ -250,7 +250,7 @@ class PersistentLogHandler(logging.Handler):
"""Shannon entropy over log-level distribution in the last 60 seconds."""
cutoff = time.monotonic() - 60.0
with self.lock:
counts = {lv: 0 for lv in _LOG_LEVELS}
counts = dict.fromkeys(_LOG_LEVELS, 0)
total = 0
for ts, level in self._level_events:
if ts >= cutoff: