From 880edb658d9cb0b9ddc70bfc6c50c01d2fef3eb3 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Tue, 14 Oct 2025 18:02:18 +0800 Subject: [PATCH 1/3] Type hint for result_backend in inmemory_broker --- taskiq/brokers/inmemory_broker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskiq/brokers/inmemory_broker.py b/taskiq/brokers/inmemory_broker.py index 23d64ef..c2262b1 100644 --- a/taskiq/brokers/inmemory_broker.py +++ b/taskiq/brokers/inmemory_broker.py @@ -130,7 +130,7 @@ def __init__( await_inplace: bool = False, ) -> None: super().__init__() - self.result_backend = InmemoryResultBackend( + self.result_backend: InmemoryResultBackend[Any] = InmemoryResultBackend( max_stored_results=max_stored_results, ) self.executor = ThreadPoolExecutor(sync_tasks_pool_size) From b4ff14b738b9399df952067dc580fb68be0dbf43 Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Tue, 14 Oct 2025 18:07:53 +0800 Subject: [PATCH 2/3] Update inmemory_broker.py --- taskiq/brokers/inmemory_broker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskiq/brokers/inmemory_broker.py b/taskiq/brokers/inmemory_broker.py index c2262b1..b73e8d5 100644 --- a/taskiq/brokers/inmemory_broker.py +++ b/taskiq/brokers/inmemory_broker.py @@ -130,7 +130,7 @@ def __init__( await_inplace: bool = False, ) -> None: super().__init__() - self.result_backend: InmemoryResultBackend[Any] = InmemoryResultBackend( + self.result_backend: InmemoryResultBackend[_ReturnType] = InmemoryResultBackend( max_stored_results=max_stored_results, ) self.executor = ThreadPoolExecutor(sync_tasks_pool_size) From a5541434feae09519fac0b55669e2054ff4ea88e Mon Sep 17 00:00:00 2001 From: LIghtJUNction Date: Tue, 14 Oct 2025 18:12:14 +0800 Subject: [PATCH 3/3] Update inmemory_broker.py --- taskiq/brokers/inmemory_broker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskiq/brokers/inmemory_broker.py b/taskiq/brokers/inmemory_broker.py index b73e8d5..c2262b1 100644 --- a/taskiq/brokers/inmemory_broker.py +++ b/taskiq/brokers/inmemory_broker.py @@ -130,7 +130,7 @@ def __init__( await_inplace: bool = False, ) -> None: super().__init__() - self.result_backend: InmemoryResultBackend[_ReturnType] = InmemoryResultBackend( + self.result_backend: InmemoryResultBackend[Any] = InmemoryResultBackend( max_stored_results=max_stored_results, ) self.executor = ThreadPoolExecutor(sync_tasks_pool_size)