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: