From 2a4c51d7219660d39b346016bd2216cdc44ad2fb Mon Sep 17 00:00:00 2001 From: Nikita Pastukhov Date: Tue, 5 Nov 2024 23:00:25 +0300 Subject: [PATCH] refactor: little type changes --- faststream/_internal/fastapi/router.py | 1 + faststream/confluent/broker/broker.py | 2 +- faststream/kafka/broker/broker.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/faststream/_internal/fastapi/router.py b/faststream/_internal/fastapi/router.py index 910c8a0387..4828893324 100644 --- a/faststream/_internal/fastapi/router.py +++ b/faststream/_internal/fastapi/router.py @@ -327,6 +327,7 @@ async def start_broker_lifespan( else: warnings.warn( "Specifying 'lifespan_context' manually is no longer necessary with FastAPI >= 0.112.2.", + category=RuntimeWarning, stacklevel=2, ) diff --git a/faststream/confluent/broker/broker.py b/faststream/confluent/broker/broker.py index 8eb7aefd87..b7853ad014 100644 --- a/faststream/confluent/broker/broker.py +++ b/faststream/confluent/broker/broker.py @@ -524,7 +524,7 @@ async def publish( # type: ignore[override] correlation_id=correlation_id or gen_cor_id(), _publish_type=PublishType.Publish, ) - return await super()._basic_publish(cmd, producer=self._producer) + await super()._basic_publish(cmd, producer=self._producer) @override async def request( # type: ignore[override] diff --git a/faststream/kafka/broker/broker.py b/faststream/kafka/broker/broker.py index 3564d52c9c..ad50958ace 100644 --- a/faststream/kafka/broker/broker.py +++ b/faststream/kafka/broker/broker.py @@ -744,7 +744,7 @@ async def publish( # type: ignore[override] correlation_id=correlation_id or gen_cor_id(), _publish_type=PublishType.Publish, ) - return await super()._basic_publish(cmd, producer=self._producer) + await super()._basic_publish(cmd, producer=self._producer) @override async def request( # type: ignore[override]