Skip to content

Commit

Permalink
Fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil Dumchenko committed Nov 11, 2024
1 parent 8c54333 commit ca0f4ef
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 6 additions & 2 deletions faststream/kafka/broker/registrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ class KafkaRegistrator(

_subscribers: Dict[
int,
Union["AsyncAPIBatchSubscriber", "AsyncAPIDefaultSubscriber", "AsyncAPIConcurrentDefaultSubscriber"],
Union[
"AsyncAPIBatchSubscriber",
"AsyncAPIDefaultSubscriber",
"AsyncAPIConcurrentDefaultSubscriber",
],
]
_publishers: Dict[
int,
Expand Down Expand Up @@ -1662,7 +1666,7 @@ def subscriber(
decoder_=decoder or self._decoder,
dependencies_=dependencies,
middlewares_=middlewares,
max_workers=max_workers
max_workers=max_workers,
)
else:
return cast("AsyncAPIDefaultSubscriber", subscriber).add_call(
Expand Down
2 changes: 1 addition & 1 deletion faststream/kafka/fastapi/fastapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2626,7 +2626,7 @@ def subscriber(
) -> Union[
"AsyncAPIBatchSubscriber",
"AsyncAPIDefaultSubscriber",
"AsyncAPIConcurrentDefaultSubscriber"
"AsyncAPIConcurrentDefaultSubscriber",
]:
subscriber = super().subscriber(
*topics,
Expand Down
2 changes: 1 addition & 1 deletion faststream/kafka/subscriber/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def create_subscriber(
) -> Union[
"AsyncAPIDefaultSubscriber",
"AsyncAPIBatchSubscriber",
"AsyncAPIConcurrentDefaultSubscriber"
"AsyncAPIConcurrentDefaultSubscriber",
]:
if is_manual and not group_id:
raise SetupError("You must use `group_id` with manual commit mode.")
Expand Down
6 changes: 2 additions & 4 deletions faststream/kafka/subscriber/usecase.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,8 @@ def get_log_context(
group_id=self.group_id,
)

class ConcurrentDefaultSubscriber(
ConcurrentMixin,
DefaultSubscriber["ConsumerRecord"]
):

class ConcurrentDefaultSubscriber(ConcurrentMixin, DefaultSubscriber["ConsumerRecord"]):
def __init__(
self,
*topics: str,
Expand Down

0 comments on commit ca0f4ef

Please sign in to comment.