Skip to content

Commit

Permalink
Merge pull request #4 from zerlok/dev
Browse files Browse the repository at this point in the history
fix python grpc stubs gen
  • Loading branch information
zerlok authored Aug 25, 2024
2 parents b186e57 + 3322a3a commit ea12d5d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,5 +135,5 @@ class GreeterStub:

def __init__(self, channel: grpc.aio.Channel) -> None:...

async def Greet(self, request: greeting_pb2.GreetRequest, *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.UnaryUnaryCall[greeting_pb2.GreetRequest, greeting_pb2.GreetResponse]:...
def Greet(self, request: greeting_pb2.GreetRequest, *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.UnaryUnaryCall[greeting_pb2.GreetRequest, greeting_pb2.GreetResponse]:...
```
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyprotostuben"
version = "0.1.1"
version = "0.1.2"
description = ""
authors = ["zerlok <[email protected]>"]
readme = "README.md"
Expand Down
1 change: 0 additions & 1 deletion src/pyprotostuben/protobuf/builder/grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ def build_grpc_stub_method_def(self, info: MethodInfo) -> ast.stmt:
),
],
returns=response,
is_async=not self.__is_sync,
)

def build_grpc_stub_method_request_response_refs(self, info: MethodInfo) -> t.Tuple[ast.expr, ast.expr]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ class GreeterStub:

def __init__(self, channel: grpc.aio.Channel) -> None:...

async def Greet(self, request: greeting_pb2.GreetRequest, *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.UnaryUnaryCall[greeting_pb2.GreetRequest, greeting_pb2.GreetResponse]:...
def Greet(self, request: greeting_pb2.GreetRequest, *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.UnaryUnaryCall[greeting_pb2.GreetRequest, greeting_pb2.GreetResponse]:...
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class ServiceStub:

def __init__(self, channel: grpc.aio.Channel) -> None:...

async def DoUnaryUnary(self, request: grpc_service_pb2.Request, *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.UnaryUnaryCall[grpc_service_pb2.Request, grpc_service_pb2.Response]:...
def DoUnaryUnary(self, request: grpc_service_pb2.Request, *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.UnaryUnaryCall[grpc_service_pb2.Request, grpc_service_pb2.Response]:...

async def DoUnaryStream(self, request: grpc_service_pb2.Request, *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.UnaryStreamCall[grpc_service_pb2.Request, grpc_service_pb2.Response]:...
def DoUnaryStream(self, request: grpc_service_pb2.Request, *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.UnaryStreamCall[grpc_service_pb2.Request, grpc_service_pb2.Response]:...

async def DoStreamUnary(self, request: typing.AsyncIterator[grpc_service_pb2.Request], *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.StreamUnaryCall[grpc_service_pb2.Request, grpc_service_pb2.Response]:...
def DoStreamUnary(self, request: typing.AsyncIterator[grpc_service_pb2.Request], *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.StreamUnaryCall[grpc_service_pb2.Request, grpc_service_pb2.Response]:...

async def DoStreamStream(self, request: typing.AsyncIterator[grpc_service_pb2.Request], *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.StreamStreamCall[grpc_service_pb2.Request, grpc_service_pb2.Response]:...
def DoStreamStream(self, request: typing.AsyncIterator[grpc_service_pb2.Request], *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.StreamStreamCall[grpc_service_pb2.Request, grpc_service_pb2.Response]:...
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ class ComplexStub:

def __init__(self, channel: grpc.aio.Channel) -> None:...

async def UnaryUnary(self, request: message_nesting_pb2.Message1, *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.UnaryUnaryCall[message_nesting_pb2.Message1, message_nesting_pb2.CombinedMessage]:...
def UnaryUnary(self, request: message_nesting_pb2.Message1, *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.UnaryUnaryCall[message_nesting_pb2.Message1, message_nesting_pb2.CombinedMessage]:...

async def StreamStream(self, request: typing.AsyncIterator[message_nesting_pb2.Message2], *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.StreamStreamCall[message_nesting_pb2.Message2, message_nesting_pb2.CombinedMessage]:...
def StreamStream(self, request: typing.AsyncIterator[message_nesting_pb2.Message2], *, timeout: typing.Optional[builtins.float]=None, metadata: typing.Optional[grpc.aio.MetadataType]=None, credentials: typing.Optional[grpc.CallCredentials]=None, wait_for_ready: typing.Optional[builtins.bool]=None, compression: typing.Optional[grpc.Compression]=None) -> grpc.aio.StreamStreamCall[message_nesting_pb2.Message2, message_nesting_pb2.CombinedMessage]:...

0 comments on commit ea12d5d

Please sign in to comment.