Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit 27e63fa

Browse files
committed
Format code
1 parent d38eeb8 commit 27e63fa

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/betterproto2_compiler/templates/service_stub_sync.py.j2

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@
3838
"{{ method.route }}",
3939
{{ method.py_input_message_type }}.SerializeToString,
4040
{{ method.py_output_message_type }}.FromString,
41-
)({{ method.py_input_message_param }}_iterator):
41+
)(messages):
4242
yield response
4343
{% else %}
4444
{% if method.is_input_msg_empty %}
45-
if {{ method.py_input_message_param }} is None:
46-
{{ method.py_input_message_param }} = {{ method.py_input_message_type }}()
45+
if message is None:
46+
message = {{ method.py_input_message_type }}()
4747

4848
{% endif %}
4949
for response in self._channel.unary_stream(
5050
"{{ method.route }}",
5151
{{ method.py_input_message_type }}.SerializeToString,
5252
{{ method.py_output_message_type }}.FromString,
53-
)({{ method.py_input_message_param }}):
53+
)(message):
5454
yield response
5555

5656
{% endif %}
@@ -60,18 +60,18 @@
6060
"{{ method.route }}",
6161
{{ method.py_input_message_type }}.SerializeToString,
6262
{{ method.py_output_message_type }}.FromString,
63-
)({{ method.py_input_message_param }}_iterator)
63+
)(messages)
6464
{% else %}
6565
{% if method.is_input_msg_empty %}
66-
if {{ method.py_input_message_param }} is None:
67-
{{ method.py_input_message_param }} = {{ method.py_input_message_type }}()
66+
if message is None:
67+
message = {{ method.py_input_message_type }}()
6868

6969
{% endif %}
7070
return self._channel.unary_unary(
7171
"{{ method.route }}",
7272
{{ method.py_input_message_type }}.SerializeToString,
7373
{{ method.py_output_message_type }}.FromString,
74-
)({{ method.py_input_message_param }})
74+
)(message)
7575
{% endif %}
7676
{% endif %}
7777
{% endblock %}

0 commit comments

Comments
 (0)