From 97da2d4a24e4023ae5fa83012a1e70d32373f275 Mon Sep 17 00:00:00 2001 From: Eugene Crosser Date: Sat, 28 May 2022 20:12:02 +0200 Subject: [PATCH] typeckecing: annotate watch.py --- gps303/watch.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gps303/watch.py b/gps303/watch.py index 2e5b412..e66689e 100644 --- a/gps303/watch.py +++ b/gps303/watch.py @@ -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"") -- 2.39.2