Skip to content

Commit 87eea0f

Browse files
committed
Fix template error that caused publish/request confusion
1 parent 77204bd commit 87eea0f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "asyncapi-python"
3-
version = "0.1.5"
3+
version = "0.1.6"
44
license = "Apache-2.0"
55
description = "Easily generate type-safe and async Python applications from AsyncAPI 3 specifications."
66
authors = ["Yaroslav Petrov <[email protected]>"]

src/asyncapi_python_codegen/generators/amqp/templates/application.py.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Application(BaseApplication):
3636

3737
{% for op in ops if op.action == "send" -%}
3838
{%- set in_type = "Union[" + (op.input_types | join(", ")) + "]" -%}
39-
{%- set out_type = "Union[" + (op.output_types | join(", ") if op.output_types else "None") + "]" -%}
39+
{%- set out_type = ("Union[" + op.output_types | join(", ") + "]") if op.output_types else "None" -%}
4040
{%- set callback_type = "Callable[["+ in_type + "], Awaitable[" + out_type + "]" + "]" -%}
4141
{%- set send_method = "publish" if out_type == "None" else "request" -%}
4242
{%- set routing_key_literal = '"' + op.routing_key + '"' if op.routing_key else "None" -%}

0 commit comments

Comments
 (0)