From 47110ed81d31702b31964d0fab6b30fbbcf2a350 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Wed, 25 Sep 2024 13:26:56 +0200 Subject: [PATCH] minimal type annotation for tests/conf.py:client --- tests/conf.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/conf.py b/tests/conf.py index 20e9e6b..4bd97e5 100644 --- a/tests/conf.py +++ b/tests/conf.py @@ -3,6 +3,8 @@ ## Make a conf_private.py for personal configuration. ## Check conf_private.py.EXAMPLE import logging +from typing import Any +from typing import Optional from caldav.davclient import DAVClient @@ -145,7 +147,7 @@ ) -def client(idx=None, **kwargs): +def client(idx: Optional[int] = None, **kwargs: Any) -> DAVClient: if idx is None and not kwargs: return client(0) elif idx is not None and not kwargs and caldav_servers: @@ -163,8 +165,9 @@ def client(idx=None, **kwargs): for kw in kwargs: if kw not in CONNKEYS: logging.critical( - "unknown keyword %s in connection parameters. All compatibility flags should now be sent as a separate list, see conf_private.py.EXAMPLE. Ignoring." - % kw + "unknown keyword %s in connection parameters. " + "All compatibility flags should now be sent as a separate list, see conf_private.py.EXAMPLE. Ignoring.", + kw, ) kwargs.pop(kw) return DAVClient(**kwargs)