Pre-fix python3 pylint failures

pull/17432/head
Eric Gribkoff 6 years ago
parent d6d71abdad
commit a324bcaad0
  1. 1
      src/python/grpcio/grpc/_channel.py
  2. 5
      src/python/grpcio/grpc/_interceptor.py
  3. 4
      src/python/grpcio_tests/tests/qps/worker_server.py
  4. 2
      src/python/grpcio_tests/tests/unit/_exit_scenarios.py

@ -175,6 +175,7 @@ def _event_handler(state, response_deserializer):
return handle_event
#pylint: disable=too-many-statements
def _consume_request_iterator(request_iterator, state, call, request_serializer,
event_handler):
if cygrpc.is_fork_support_enabled():

@ -135,9 +135,12 @@ class _FailureOutcome(grpc.RpcError, grpc.Future, grpc.Call):
def __iter__(self):
return self
def next(self):
def __next__(self):
raise self._exception
def next(self):
return self.__next__()
class _UnaryOutcome(grpc.Call, grpc.Future):

@ -39,7 +39,7 @@ class WorkerServer(worker_service_pb2_grpc.WorkerServiceServicer):
self._quit_event = threading.Event()
def RunServer(self, request_iterator, context):
config = next(request_iterator).setup
config = next(request_iterator).setup #pylint: disable=stop-iteration-return
server, port = self._create_server(config)
cores = multiprocessing.cpu_count()
server.start()
@ -102,7 +102,7 @@ class WorkerServer(worker_service_pb2_grpc.WorkerServiceServicer):
return (server, port)
def RunClient(self, request_iterator, context):
config = next(request_iterator).setup
config = next(request_iterator).setup #pylint: disable=stop-iteration-return
client_runners = []
qps_data = histogram.Histogram(config.histogram_params.resolution,
config.histogram_params.max_possible)

@ -87,7 +87,7 @@ def hang_stream_stream(request_iterator, servicer_context):
def hang_partial_stream_stream(request_iterator, servicer_context):
for _ in range(test_constants.STREAM_LENGTH // 2):
yield next(request_iterator)
yield next(request_iterator) #pylint: disable=stop-iteration-return
time.sleep(WAIT_TIME)

Loading…
Cancel
Save