Allow empty services (#222)

Fixes issue #220
This commit is contained in:
MinJune Kim 2021-03-13 05:49:58 +09:00 committed by GitHub
parent 6c1c41e9cc
commit 8a215367ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -73,6 +73,8 @@ class {{ service.py_name }}Stub(betterproto.ServiceStub):
{% if service.comment %}
{{ service.comment }}
{% elif not service.methods %}
pass
{% endif %}
{% for method in service.methods %}
async def {{ method.py_name }}(self

View File

@ -18,4 +18,5 @@ services = {
"googletypes_service_returns_empty",
"googletypes_service_returns_googletype",
"example_service",
"empty_service",
}

View File

@ -0,0 +1,7 @@
/* Empty service without comments */
syntax = "proto3";
package empty_service;
service Test {
}