Skip to content

Commit

Permalink
Add review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihir Gore committed May 4, 2021
1 parent 84c580a commit 8b4e15c
Showing 1 changed file with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
# limitations under the License.

# pylint:disable=relative-beyond-top-level
# pylint:disable=arguments-differ
# pylint:disable=no-member
# pylint:disable=signature-differs

"""Implementation of gRPC Python interceptors."""

Expand Down Expand Up @@ -51,22 +49,16 @@ def __init__(self, method, base_callable, interceptor):
def __call__(
self,
request,
timeout=None,
metadata=None,
credentials=None,
wait_for_ready=None,
compression=None,
**kwargs
):
def invoker(request, metadata):
return self._base_callable(
request,
timeout,
metadata,
credentials,
wait_for_ready,
compression,
**kwargs
)

metadata = kwargs.get("metadata")
timeout = kwargs.get("timeout")
client_info = _UnaryClientInfo(self._method, timeout)
return self._interceptor.intercept_unary(
request, metadata, client_info, invoker
Expand Down

0 comments on commit 8b4e15c

Please sign in to comment.