Skip to content

Commit

Permalink
fix: new version of grpc causes linting issues if these aren't implem…
Browse files Browse the repository at this point in the history
…ented (open-telemetry#696)

This addresses the linting problems caused by a newer version of grpc:

************ Module _interceptor

ext/opentelemetry-ext-grpc/src/opentelemetry/ext/grpc/grpcext/_interceptor.py:167:0: W0223: Method '__enter__' is abstract in class 'Channel' but is not overridden (abstract-method)

ext/opentelemetry-ext-grpc/src/opentelemetry/ext/grpc/grpcext/_interceptor.py:167:0: W0223: Method '__exit__' is abstract in class 'Channel' but is not overridden (abstract-method)
  • Loading branch information
alrex authored and cnnradams committed May 15, 2020
1 parent 832f604 commit 6983a25
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ def close(self):
)
self._channel.close()

def __enter__(self):
"""Enters the runtime context related to the channel object."""
raise NotImplementedError()

def __exit__(self, exc_type, exc_val, exc_tb):
"""Exits the runtime context related to the channel object."""
raise NotImplementedError()


def intercept_channel(channel, *interceptors):
result = channel
Expand Down

0 comments on commit 6983a25

Please sign in to comment.