From 8a0ff0f57985953b1c420bb0b4acf84773f104dd Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Wed, 7 Oct 2026 19:11:10 +0300 Subject: [PATCH] fix: annotate context managers with Generator for ty 0.0.85 --- faststream_redis_timers/testing.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/faststream_redis_timers/testing.py b/faststream_redis_timers/testing.py index 57c9f1e..c7d7b84 100644 --- a/faststream_redis_timers/testing.py +++ b/faststream_redis_timers/testing.py @@ -16,7 +16,7 @@ if typing.TYPE_CHECKING: - from collections.abc import Iterator + from collections.abc import Generator @dataclass(frozen=True, slots=True) @@ -57,13 +57,13 @@ def create_publisher_fake_subscriber( return subscriber, is_real @contextmanager - def _patch_producer(self, broker: TimersBroker) -> "Iterator[None]": + def _patch_producer(self, broker: TimersBroker) -> "Generator[None]": producer = FakeTimersProducer(broker, scheduled_timers=self.scheduled_timers) with change_producer(broker.config.broker_config, producer): yield @contextmanager - def _patch_broker(self, broker: TimersBroker) -> "Iterator[None]": + def _patch_broker(self, broker: TimersBroker) -> "Generator[None]": # Test-broker contract: messages deliver immediately, so there are # never any pending timers. Stub the inspection paths to return that. mock_client = AsyncMock()