clean up docstrings and remove unused imports

pull/24288/head
Tim Hughes 4 years ago
parent 7aff6c4555
commit 0b3fc20b83
  1. 4
      examples/python/helloworld/async_greeter_client.py
  2. 7
      examples/python/helloworld/async_greeter_server.py

@ -1,4 +1,4 @@
# Copyright 2015 gRPC authors. # Copyright 2020 gRPC authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
"""The Python implementation of the GRPC helloworld.Greeter client.""" """The Python AsyncIO implementation of the GRPC helloworld.Greeter client."""
import logging import logging
import asyncio import asyncio

@ -1,4 +1,4 @@
# Copyright 2015 gRPC authors. # Copyright 2020 gRPC authors.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
@ -11,9 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
"""The Python implementation of the GRPC helloworld.Greeter server.""" """The Python AsyncIO implementation of the GRPC helloworld.Greeter server."""
from concurrent import futures
import logging import logging
import asyncio import asyncio
import grpc import grpc
@ -24,7 +23,7 @@ import helloworld_pb2_grpc
class Greeter(helloworld_pb2_grpc.GreeterServicer): class Greeter(helloworld_pb2_grpc.GreeterServicer):
def SayHello(self, request, context): async def SayHello(self, request, context):
return helloworld_pb2.HelloReply(message='Hello, %s!' % request.name) return helloworld_pb2.HelloReply(message='Hello, %s!' % request.name)

Loading…
Cancel
Save