aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio_reflection/grpc_reflection
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/grpcio_reflection/grpc_reflection')
-rw-r--r--src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py b/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py
index 26a7ba8685..0c564f10e5 100644
--- a/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py
+++ b/src/python/grpcio_reflection/grpc_reflection/v1alpha/reflection.py
@@ -27,7 +27,8 @@ def _not_found_error():
return reflection_pb2.ServerReflectionResponse(
error_response=reflection_pb2.ErrorResponse(
error_code=grpc.StatusCode.NOT_FOUND.value[0],
- error_message=grpc.StatusCode.NOT_FOUND.value[1].encode(),))
+ error_message=grpc.StatusCode.NOT_FOUND.value[1].encode(),
+ ))
def _file_descriptor_response(descriptor):
@@ -101,10 +102,11 @@ class ReflectionServicer(reflection_pb2_grpc.ServerReflectionServicer):
def _list_services(self):
return reflection_pb2.ServerReflectionResponse(
- list_services_response=reflection_pb2.ListServiceResponse(service=[
- reflection_pb2.ServiceResponse(name=service_name)
- for service_name in self._service_names
- ]))
+ list_services_response=reflection_pb2.ListServiceResponse(
+ service=[
+ reflection_pb2.ServiceResponse(name=service_name)
+ for service_name in self._service_names
+ ]))
def ServerReflectionInfo(self, request_iterator, context):
# pylint: disable=unused-argument
@@ -128,7 +130,8 @@ class ReflectionServicer(reflection_pb2_grpc.ServerReflectionServicer):
error_response=reflection_pb2.ErrorResponse(
error_code=grpc.StatusCode.INVALID_ARGUMENT.value[0],
error_message=grpc.StatusCode.INVALID_ARGUMENT.value[1]
- .encode(),))
+ .encode(),
+ ))
def enable_server_reflection(service_names, server, pool=None):