Skip to content

Commit

Permalink
Enable unused-argument lint
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielmanistaatgoogle committed Mar 3, 2017
1 parent 8fccf59 commit 3ec1366
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
10 changes: 3 additions & 7 deletions src/python/grpcio/grpc/_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def consume_request_iterator():
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()
Expand Down Expand Up @@ -736,7 +736,7 @@ def channel_spin():
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:
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion src/python/grpcio/grpc/beta/_client_adaptations.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
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,
Expand Down
2 changes: 1 addition & 1 deletion src/python/grpcio/grpc/beta/_server_adaptations.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def pipe_requests():
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(
Expand Down

0 comments on commit 3ec1366

Please sign in to comment.