fix: apply ruff auto-fixes and add hk git hooks
- Fix pre-existing lint errors in engine/ modules using ruff --unsafe-fixes - Add hk.pkl with pre-commit and pre-push hooks using ruff builtin - Configure hooks to use 'uv run' prefix for tool execution - Update mise.toml to include hk and pkl tools - All 73 tests pass
This commit is contained in:
@@ -25,7 +25,7 @@ class NtfyPoller:
|
||||
self.topic_url = topic_url
|
||||
self.poll_interval = poll_interval
|
||||
self.display_secs = display_secs
|
||||
self._message = None # (title, body, monotonic_timestamp) or None
|
||||
self._message = None # (title, body, monotonic_timestamp) or None
|
||||
self._lock = threading.Lock()
|
||||
|
||||
def start(self):
|
||||
@@ -54,9 +54,12 @@ class NtfyPoller:
|
||||
while True:
|
||||
try:
|
||||
req = urllib.request.Request(
|
||||
self.topic_url, headers={"User-Agent": "mainline/0.1"})
|
||||
self.topic_url, headers={"User-Agent": "mainline/0.1"}
|
||||
)
|
||||
resp = urllib.request.urlopen(req, timeout=10)
|
||||
for line in resp.read().decode('utf-8', errors='replace').strip().split('\n'):
|
||||
for line in (
|
||||
resp.read().decode("utf-8", errors="replace").strip().split("\n")
|
||||
):
|
||||
if not line.strip():
|
||||
continue
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user