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 owais committed May 22, 2020
1 parent 69a87b8 commit 07d872f
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,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 07d872f

Please sign in to comment.