From d880ac3e862524b0bc30481875bfdb045a818b2c Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 18 May 2024 23:02:09 +0100 Subject: [PATCH] linting + formatting --- faststream/confluent/testing.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/faststream/confluent/testing.py b/faststream/confluent/testing.py index 90c24297cd..1a00e829c2 100644 --- a/faststream/confluent/testing.py +++ b/faststream/confluent/testing.py @@ -6,7 +6,6 @@ from faststream.broker.message import encode_message, gen_cor_id from faststream.confluent.broker import KafkaBroker -from faststream.confluent.client import TopicPartition from faststream.confluent.publisher.asyncapi import AsyncAPIBatchPublisher from faststream.confluent.publisher.producer import AsyncConfluentFastProducer from faststream.confluent.subscriber.asyncapi import AsyncAPIBatchSubscriber @@ -37,17 +36,10 @@ def create_publisher_fake_subscriber( broker: KafkaBroker, publisher: "AsyncAPIPublisher[Any]", ) -> "HandlerCallWrapper[Any, Any, Any]": - if publisher.partition: - tp = TopicPartition(topic=publisher.topic, partition=publisher.partition) - sub = broker.subscriber( - partitions=[tp], - batch=isinstance(publisher, AsyncAPIBatchPublisher), - ) - else: - sub = broker.subscriber( - publisher.topic, - batch=isinstance(publisher, AsyncAPIBatchPublisher), - ) + sub = broker.subscriber( # type: ignore[call-overload,misc] + publisher.topic, + batch=isinstance(publisher, AsyncAPIBatchPublisher), + ) if not sub.calls: