Skip to content

Commit

Permalink
linting + formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sifex committed May 18, 2024
1 parent e78ce9f commit d880ac3
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions faststream/confluent/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:

Expand Down

0 comments on commit d880ac3

Please sign in to comment.