File tree Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Expand file tree Collapse file tree 3 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 11"""FastStream - taskiq integration to schedule FastStream tasks."""
2- __version__ = "0.1.7 "
2+ __version__ = "0.1.8 "
Original file line number Diff line number Diff line change 11import typing
22import warnings
3+ from typing import Any
34
45import anyio
56from faststream .app import FastStream
6- from faststream .broker .core .asynchronous import BrokerAsyncUsecase
77from faststream .types import SendableMessage
88from taskiq import AsyncBroker , BrokerMessage
99from taskiq .acks import AckableMessage
@@ -31,7 +31,7 @@ class BrokerWrapper(AsyncBroker):
3131 task : Register FastStream scheduled task.
3232 """
3333
34- def __init__ (self , broker : BrokerAsyncUsecase [ typing . Any , typing . Any ] ) -> None :
34+ def __init__ (self , broker : Any ) -> None :
3535 super ().__init__ ()
3636 self .serializer = PatchedSerializer ()
3737 self .broker = broker
@@ -131,7 +131,7 @@ async def kick(self, message: BrokerMessage) -> None:
131131
132132
133133async def _broker_publish (
134- broker : BrokerAsyncUsecase [ typing . Any , typing . Any ] ,
134+ broker : Any ,
135135 message : BrokerMessage ,
136136) -> None :
137137 labels = message .labels
Original file line number Diff line number Diff line change 44from unittest .mock import MagicMock
55
66import pytest
7- from faststream .broker .core .asynchronous import BrokerAsyncUsecase
87from faststream .utils .functions import timeout_scope
98from taskiq import AsyncBroker , TaskiqScheduler
109from taskiq .cli .scheduler .args import SchedulerArgs
@@ -20,14 +19,14 @@ class SchedulerTestcase:
2019 subj_name : str
2120
2221 @staticmethod
23- def build_taskiq_broker (broker : BrokerAsyncUsecase [ Any , Any ] ) -> AsyncBroker :
22+ def build_taskiq_broker (broker : Any ) -> AsyncBroker :
2423 """Build Taskiq compatible object."""
2524 return BrokerWrapper (broker )
2625
2726 async def test_task (
2827 self ,
2928 subject : str ,
30- broker : BrokerAsyncUsecase [ Any , Any ] ,
29+ broker : Any ,
3130 mock : MagicMock ,
3231 event : asyncio .Event ,
3332 ) -> None :
You can’t perform that action at this time.
0 commit comments