From 1f61e86cba53993bf615562b3a44cc9b464e4c7d Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Sun, 9 Aug 2020 03:53:39 +0200 Subject: [PATCH] Clean up example --- README.md | 2 +- example/client.py | 2 +- example/server.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ec74fee..fa63cb8 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ from purerpc import Server class Greeter(GreeterServicer): async def SayHello(self, message): - return HelloReply(message="Hello, " + message.name) + return HelloReply(message=f"Hello {message.name}") async def SayHelloToMany(self, input_messages): async for message in input_messages: diff --git a/example/client.py b/example/client.py index aac718a..32e5b46 100644 --- a/example/client.py +++ b/example/client.py @@ -1,7 +1,7 @@ """Greeter client.""" - import anyio import purerpc + from greeter_grpc import GreeterStub from greeter_pb2 import HelloReply, HelloRequest diff --git a/example/server.py b/example/server.py index b315aa6..a434839 100644 --- a/example/server.py +++ b/example/server.py @@ -1,13 +1,13 @@ """Greeter server.""" +from purerpc import Server from greeter_grpc import GreeterServicer from greeter_pb2 import HelloReply, HelloRequest -from purerpc import Server class Greeter(GreeterServicer): async def SayHello(self, message): - return HelloReply(message="Hello, " + message.name) + return HelloReply(message=f"Hello, {message.name}") async def SayHelloToMany(self, input_messages): async for message in input_messages: