Skip to content

Commit

Permalink
Update protoc-gen-custom_grpc
Browse files Browse the repository at this point in the history
  • Loading branch information
uael authored Nov 6, 2023
1 parent d83ac2f commit 085c815
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/_build/protoc-gen-custom_grpc
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,12 @@ _HEADER = '''# Copyright 2022 Google LLC
# limitations under the License.
"""Generated python gRPC interfaces."""
from __future__ import annotations
'''

_UTILS_PY = f'''{_HEADER}
from __future__ import annotations
import asyncio
import queue
import grpc
Expand Down Expand Up @@ -595,9 +595,9 @@ for file_name in _REQUEST.file_to_generate:
content='def unwrap(x):\n assert x\n return x\n'
))

pyi_imports: List[str] = ['from __future__ import annotations # type: ignore']
grpc_imports: List[str] = ['from __future__ import annotations # type: ignore', 'import grpc']
grpc_aio_imports: List[str] = ['from __future__ import annotations # type: ignore', 'import grpc', 'import grpc.aio']
pyi_imports: List[str] = []
grpc_imports: List[str] = ['import grpc']
grpc_aio_imports: List[str] = ['import grpc', 'import grpc.aio']

enums = '\n'.join(sum([generate_enum(pyi_imports, file, enum, _FILES) for enum in file.enum_type], []))
messages = '\n'.join(sum([generate_message(pyi_imports, file, message, _FILES) for message in file.message_type], []))
Expand Down

0 comments on commit 085c815

Please sign in to comment.