From 2ce5edfdebc0b5e4d84f57fe821e0d4ed7823174 Mon Sep 17 00:00:00 2001 From: Hans Trompert Date: Wed, 27 Mar 2024 10:04:25 +0100 Subject: [PATCH] re-add three type ignores --- src/supa/connection/provider/server.py | 2 +- src/supa/job/reserve.py | 2 +- src/supa/job/shared.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/supa/connection/provider/server.py b/src/supa/connection/provider/server.py index 9086af9c..99c3f071 100644 --- a/src/supa/connection/provider/server.py +++ b/src/supa/connection/provider/server.py @@ -163,7 +163,7 @@ def _register_request( is stored in this function. """ if not connection_id and type(request) != QueryRequest: - connection_id = UUID(request.connection_id) + connection_id = UUID(request.connection_id) # type: ignore[arg-type] from supa.db.session import db_session diff --git a/src/supa/job/reserve.py b/src/supa/job/reserve.py index 575484fb..cbf16240 100644 --- a/src/supa/job/reserve.py +++ b/src/supa/job/reserve.py @@ -671,7 +671,7 @@ def __call__(self) -> None: self.log.debug("Sending message", method="ReserveTimeout", request_message=request) stub.ReserveTimeout(request) else: - register_result(request, ResultType.Error) + register_result(request, ResultType.Error) # type: ignore[arg-type] self.log.debug("Sending message", method="Error", request_message=request) stub.Error(request) diff --git a/src/supa/job/shared.py b/src/supa/job/shared.py index efa20c31..a99096f2 100644 --- a/src/supa/job/shared.py +++ b/src/supa/job/shared.py @@ -223,7 +223,7 @@ def register_result( if type(request) == ErrorRequest: connection_id = request.service_exception.connection_id else: - connection_id = request.connection_id + connection_id = request.connection_id # type: ignore[union-attr] with db_session() as session: try: # find the highest result ID for this connection ID and increment by 1