Enable unused-argument lint

pull/9974/head
Nathaniel Manista 8 years ago
parent 8fccf59d04
commit 3ec1366eb6
  1. 3
      .pylintrc
  2. 10
      src/python/grpcio/grpc/_channel.py
  3. 2
      src/python/grpcio/grpc/beta/_client_adaptations.py
  4. 2
      src/python/grpcio/grpc/beta/_server_adaptations.py

@ -25,7 +25,6 @@ notes=FIXME,XXX
#TODO: Enable locally-disabled
#TODO: Enable protected-access
#TODO: Enable no-name-in-module
#TODO: Enable unused-argument
#TODO: Enable wrong-import-order
# TODO(https://github.com/PyCQA/pylint/issues/59#issuecomment-283774279):
# enable cyclic-import after a 1.7-or-later pylint release that recognizes our
@ -38,4 +37,4 @@ notes=FIXME,XXX
#TODO: Enable useless-else-on-loop
#TODO: Enable too-many-nested-blocks
disable=missing-docstring,too-few-public-methods,no-init,duplicate-code,invalid-name,locally-disabled,protected-access,no-name-in-module,unused-argument,wrong-import-order,cyclic-import,too-many-instance-attributes,too-many-lines,redefined-variable-type,next-method-called,import-error,useless-else-on-loop,too-many-nested-blocks
disable=missing-docstring,too-few-public-methods,no-init,duplicate-code,invalid-name,locally-disabled,protected-access,no-name-in-module,wrong-import-order,cyclic-import,too-many-instance-attributes,too-many-lines,redefined-variable-type,next-method-called,import-error,useless-else-on-loop,too-many-nested-blocks

@ -237,7 +237,7 @@ def _consume_request_iterator(request_iterator, state, call,
cygrpc.Operations(operations), event_handler)
state.due.add(cygrpc.OperationType.send_close_from_client)
def stop_consumption_thread(timeout):
def stop_consumption_thread(timeout): # pylint: disable=unused-argument
with state.condition:
if state.code is None:
call.cancel()
@ -736,7 +736,7 @@ def _run_channel_spin_thread(state):
state.managed_calls = None
return
def stop_channel_spin(timeout):
def stop_channel_spin(timeout): # pylint: disable=unused-argument
with state.lock:
if state.managed_calls is not None:
for call in state.managed_calls:
@ -877,12 +877,8 @@ def _moot(state):
def _subscribe(state, callback, try_to_connect):
with state.lock:
if not state.callbacks_and_connectivities and not state.polling:
def cancel_all_subscriptions(timeout):
_moot(state)
polling_thread = _common.CleanupThread(
cancel_all_subscriptions,
lambda timeout: _moot(state),
target=_poll_connectivity,
args=(state, state.channel, bool(try_to_connect)))
polling_thread.start()

@ -35,7 +35,7 @@ from grpc.framework.common import cardinality
from grpc.framework.foundation import future
from grpc.framework.interfaces.face import face
# pylint: disable=too-many-arguments,too-many-locals
# pylint: disable=too-many-arguments,too-many-locals,unused-argument
_STATUS_CODE_TO_ABORTION_KIND_AND_ABORTION_ERROR_CLASS = {
grpc.StatusCode.CANCELLED: (face.Abortion.Kind.CANCELLED,

@ -181,7 +181,7 @@ def _run_request_pipe_thread(request_iterator, request_consumer,
return
request_consumer.terminate()
def stop_request_pipe(timeout):
def stop_request_pipe(timeout): # pylint: disable=unused-argument
thread_joined.set()
request_pipe_thread = _common.CleanupThread(

Loading…
Cancel
Save