From 8d8648e9ddceaf35308cc20754d0640badf4de69 Mon Sep 17 00:00:00 2001 From: Walter Boring Date: Tue, 24 Mar 2026 13:05:49 -0400 Subject: [PATCH] style(threads): add return type to loop() and use modern type hints - Add -> bool return type annotation to abstract loop() method - Replace 'from typing import List' with built-in list[] (Python 3.9+) --- aprsd/threads/aprsd.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/aprsd/threads/aprsd.py b/aprsd/threads/aprsd.py index 6a84d31..2377770 100644 --- a/aprsd/threads/aprsd.py +++ b/aprsd/threads/aprsd.py @@ -2,7 +2,6 @@ import abc import datetime import logging import threading -from typing import List import wrapt @@ -61,7 +60,7 @@ class APRSDThread(threading.Thread, metaclass=abc.ABCMeta): return self._shutdown_event.wait(timeout=wait_time) @abc.abstractmethod - def loop(self): + def loop(self) -> bool: pass def _cleanup(self): @@ -98,7 +97,7 @@ class APRSDThreadList: _instance = None - threads_list: List[APRSDThread] = [] + threads_list: list[APRSDThread] = [] lock = threading.Lock() def __new__(cls, *args, **kwargs):