Skip to content

Commit 70cba14

Browse files
author
Вадим Козыревский
committed
Fixes after pre-commit
1 parent 4781ac1 commit 70cba14

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

docker-compose-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ services:
4141
KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs'
4242
volumes:
4343
- ./scripts/update_run.sh:/tmp/update_run.sh
44-
command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'"
44+
command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'"

examples/kafka_event_consuming.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,11 @@
109109

110110

111111
async def empty_message_decoder(
112-
msg: kafka.KafkaMessage,
113-
original_decoder: typing.Callable[
114-
[kafka.KafkaMessage],
115-
typing.Awaitable[types.DecodedMessage],
116-
],
112+
msg: kafka.KafkaMessage,
113+
original_decoder: typing.Callable[
114+
[kafka.KafkaMessage],
115+
typing.Awaitable[types.DecodedMessage],
116+
],
117117
) -> types.DecodedMessage | None:
118118
"""
119119
Decode a kafka message and return it if it is not empty.
@@ -158,11 +158,11 @@ def mediator_factory() -> cqrs.EventMediator:
158158
decoder=empty_message_decoder,
159159
)
160160
async def hello_world_event_handler(
161-
body: cqrs.NotificationEvent[HelloWorldPayload]
162-
| deserializers.DeserializeJsonError
163-
| None,
164-
msg: kafka.KafkaMessage,
165-
mediator: cqrs.EventMediator = faststream.Depends(mediator_factory),
161+
body: cqrs.NotificationEvent[HelloWorldPayload]
162+
| deserializers.DeserializeJsonError
163+
| None,
164+
msg: kafka.KafkaMessage,
165+
mediator: cqrs.EventMediator = faststream.Depends(mediator_factory),
166166
):
167167
if not isinstance(body, deserializers.DeserializeJsonError) and body is not None:
168168
await mediator.send(body)

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ examples = [
5353
"faststream[kafka]==0.5.28",
5454
"faker>=37.12.0"
5555
]
56-
rabbit = [
57-
"aio-pika==9.3.0",
58-
]
5956
kafka = [
6057
"aiokafka==0.10.0",
6158
# for SchemaRegistry
6259
"confluent-kafka==2.6.0"
6360
]
6461
protobuf = ["protobuf==4.25.5"]
62+
rabbit = [
63+
"aio-pika==9.3.0"
64+
]
6565

6666
[project.urls]
6767
Documentation = "https://vadikko2.github.io/python-cqrs-mkdocs/"

0 commit comments

Comments
 (0)