[elbe-devel] [PATCH 07/10] elbepack: log: annotate types of queues class variables

Thomas Weißschuh thomas.weissschuh at linutronix.de
Mon Aug 12 14:19:28 CEST 2024


Mypy can not infer the types of this class variable.
Annotate it explicitly.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
 elbepack/log.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elbepack/log.py b/elbepack/log.py
index afcf604d3afc..79d4de2e68be 100644
--- a/elbepack/log.py
+++ b/elbepack/log.py
@@ -32,7 +32,7 @@ class LoggingQueue(collections.deque):
 
 class QHandler(logging.Handler):
 
-    queues = {}
+    queues: dict[str, LoggingQueue] = {}
 
     def __init__(self, target, *args, **kwargs):
         super(QHandler, self).__init__(*args, **kwargs)

-- 
2.46.0



More information about the elbe-devel mailing list