]> www.average.org Git - loctrkd.git/blobdiff - gps303/watch.py
typeckecing: annotate watch.py
[loctrkd.git] / gps303 / watch.py
index 2e5b412fb89c87c98d0338ff3069f934f3132896..e66689ec33ebfd703c98eda5e5fc3c1a9f68302e 100644 (file)
@@ -1,5 +1,6 @@
 """ Watch for locevt and print them """
 
+from configparser import ConfigParser
 from datetime import datetime, timezone
 from logging import getLogger
 import zmq
@@ -11,9 +12,10 @@ from .zmsg import Bcast
 log = getLogger("gps303/watch")
 
 
-def runserver(conf):
-    zctx = zmq.Context()
-    zsub = zctx.socket(zmq.SUB)
+def runserver(conf: ConfigParser) -> None:
+    # Is this https://github.com/zeromq/pyzmq/issues/1627 still not fixed?!
+    zctx = zmq.Context()  # type: ignore
+    zsub = zctx.socket(zmq.SUB)  # type: ignore
     zsub.connect(conf.get("collector", "publishurl"))
     zsub.setsockopt(zmq.SUBSCRIBE, b"")