pull/21458/head
Richard Belleville 5 years ago
parent 2d9e8bc736
commit 05aaf3d939
  1. 2
      .pylintrc-examples
  2. 1
      examples/python/cancellation/client.py
  3. 14
      src/python/grpcio/grpc/_runtime_protos.py

@ -98,3 +98,5 @@ disable=
no-else-return,
# NOTE(lidiz): Python 3 make object inheritance default, but not PY2
useless-object-inheritance,
# NOTE(rbellevi): Pylint does not recognize grpc.protos() as an import.
wrong-import-position,

@ -19,7 +19,6 @@ from __future__ import print_function
import argparse
import logging
import os
import signal
import sys

@ -48,7 +48,7 @@ def _interpreter_version_protos_and_services(*args, **kwargs):
)
def protos(protobuf_path):
def protos(protobuf_path): # pylint: disable=unused-argument
"""Returns a module generated by the indicated .proto file.
Use this function to retrieve classes corresponding to message
@ -69,7 +69,7 @@ def protos(protobuf_path):
"""
def services(protobuf_path):
def services(protobuf_path): # pylint: disable=unused-argument
"""Returns a module generated by the indicated .proto file.
Use this function to retrieve classes and functions corresponding to
@ -91,7 +91,7 @@ def services(protobuf_path):
"""
def protos_and_services(protobuf_path):
def protos_and_services(protobuf_path): # pylint: disable=unused-argument
"""Returns a 2-tuple of modules corresponding to protos and services.
The return value of this function is equivalent to a call to protos and a
@ -105,7 +105,7 @@ if sys.version_info[0] < 3:
protos_and_services = _interpreter_version_protos_and_services
else:
try:
import grpc_tools
import grpc_tool # pylint: disable=unused-import
except ImportError as e:
# NOTE: It's possible that we're encountering a transitive ImportError, so
# we check for that and re-raise if so.
@ -115,6 +115,6 @@ else:
services = _uninstalled_services
protos_and_services = _uninstalled_protos_and_services
else:
from grpc_tools.protoc import _protos as protos
from grpc_tools.protoc import _services as services
from grpc_tools.protoc import _protos_and_services as protos_and_services
from grpc_tools.protoc import _protos as protos # pylint: disable=unused-import
from grpc_tools.protoc import _services as services # pylint: disable=unused-import
from grpc_tools.protoc import _protos_and_services as protos_and_services # pylint: disable=unused-import

Loading…
Cancel
Save