Eliminate function-redefined suppression

pull/15113/head
Mehrdad Afshari 7 years ago committed by Mehrdad Afshari
parent bc947ada75
commit 86d04c2e34
  1. 1
      .pylintrc-tests
  2. 24
      src/python/grpcio_tests/tests/testing/_client_application.py

@ -49,7 +49,6 @@ disable=
too-many-format-args, too-many-format-args,
too-many-return-statements, too-many-return-statements,
too-many-statements, too-many-statements,
function-redefined,
wildcard-import, wildcard-import,
line-too-long, line-too-long,
wrong-import-position, wrong-import-position,

@ -215,30 +215,6 @@ def _run_infinite_request_stream(stub):
return _UNSATISFACTORY_OUTCOME return _UNSATISFACTORY_OUTCOME
def run(scenario, channel):
stub = services_pb2_grpc.FirstServiceStub(channel)
try:
if scenario is Scenario.UNARY_UNARY:
return _run_unary_unary(stub)
elif scenario is Scenario.UNARY_STREAM:
return _run_unary_stream(stub)
elif scenario is Scenario.STREAM_UNARY:
return _run_stream_unary(stub)
elif scenario is Scenario.STREAM_STREAM:
return _run_stream_stream(stub)
elif scenario is Scenario.CONCURRENT_STREAM_UNARY:
return _run_concurrent_stream_unary(stub)
elif scenario is Scenario.CONCURRENT_STREAM_STREAM:
return _run_concurrent_stream_stream(stub)
elif scenario is Scenario.CANCEL_UNARY_UNARY:
return _run_cancel_unary_unary(stub)
elif scenario is Scenario.INFINITE_REQUEST_STREAM:
return _run_infinite_request_stream(stub)
except grpc.RpcError as rpc_error:
return Outcome(Outcome.Kind.RPC_ERROR, rpc_error.code(),
rpc_error.details())
_IMPLEMENTATIONS = { _IMPLEMENTATIONS = {
Scenario.UNARY_UNARY: _run_unary_unary, Scenario.UNARY_UNARY: _run_unary_unary,
Scenario.UNARY_STREAM: _run_unary_stream, Scenario.UNARY_STREAM: _run_unary_stream,

Loading…
Cancel
Save