From dad409035282cb007dd8b31b2511765819d55c70 Mon Sep 17 00:00:00 2001 From: Matthias Veit Date: Mon, 30 Oct 2023 12:54:29 +0100 Subject: [PATCH] fix type --- fixcloudutils/service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fixcloudutils/service.py b/fixcloudutils/service.py index 5025516..967922c 100644 --- a/fixcloudutils/service.py +++ b/fixcloudutils/service.py @@ -25,7 +25,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . import logging -from typing import Any, TypeVar, Dict, List, Type, AsyncContextManager +from typing import Any, TypeVar, Dict, List, Type, AsyncContextManager, Tuple ServiceType = TypeVar("ServiceType", bound="Service") T = TypeVar("T") @@ -60,8 +60,8 @@ def extend(self, **deps: Any) -> "Dependencies": return self @property - def services(self) -> List[(str, AsyncContextManager[Any])]: - return [(k,v) for k, v in self.lookup.items() if isinstance(v, AsyncContextManager)] + def services(self) -> List[Tuple[str, AsyncContextManager[Any]]]: + return [(k, v) for k, v in self.lookup.items() if isinstance(v, AsyncContextManager)] def service(self, name: str, clazz: Type[T]) -> T: if isinstance(existing := self.lookup.get(name), clazz):