mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-10-28 16:02:50 +00:00
refactor(code): clean up import statements, improve docstrings, and update error handling across various modules
This commit is contained in:
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:
|
||||
|
||||
Reference in new issue
Block a user