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 1
1
"""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 1
1
import typing
2
2
import warnings
3
+ from typing import Any
3
4
4
5
import anyio
5
6
from faststream .app import FastStream
6
- from faststream .broker .core .asynchronous import BrokerAsyncUsecase
7
7
from faststream .types import SendableMessage
8
8
from taskiq import AsyncBroker , BrokerMessage
9
9
from taskiq .acks import AckableMessage
@@ -31,7 +31,7 @@ class BrokerWrapper(AsyncBroker):
31
31
task : Register FastStream scheduled task.
32
32
"""
33
33
34
- def __init__ (self , broker : BrokerAsyncUsecase [ typing . Any , typing . Any ] ) -> None :
34
+ def __init__ (self , broker : Any ) -> None :
35
35
super ().__init__ ()
36
36
self .serializer = PatchedSerializer ()
37
37
self .broker = broker
@@ -131,7 +131,7 @@ async def kick(self, message: BrokerMessage) -> None:
131
131
132
132
133
133
async def _broker_publish (
134
- broker : BrokerAsyncUsecase [ typing . Any , typing . Any ] ,
134
+ broker : Any ,
135
135
message : BrokerMessage ,
136
136
) -> None :
137
137
labels = message .labels
Original file line number Diff line number Diff line change 4
4
from unittest .mock import MagicMock
5
5
6
6
import pytest
7
- from faststream .broker .core .asynchronous import BrokerAsyncUsecase
8
7
from faststream .utils .functions import timeout_scope
9
8
from taskiq import AsyncBroker , TaskiqScheduler
10
9
from taskiq .cli .scheduler .args import SchedulerArgs
@@ -20,14 +19,14 @@ class SchedulerTestcase:
20
19
subj_name : str
21
20
22
21
@staticmethod
23
- def build_taskiq_broker (broker : BrokerAsyncUsecase [ Any , Any ] ) -> AsyncBroker :
22
+ def build_taskiq_broker (broker : Any ) -> AsyncBroker :
24
23
"""Build Taskiq compatible object."""
25
24
return BrokerWrapper (broker )
26
25
27
26
async def test_task (
28
27
self ,
29
28
subject : str ,
30
- broker : BrokerAsyncUsecase [ Any , Any ] ,
29
+ broker : Any ,
31
30
mock : MagicMock ,
32
31
event : asyncio .Event ,
33
32
) -> None :
You can’t perform that action at this time.
0 commit comments