Skip to content

Commit 6983a25

Browse files
alrexcnnradams
alrex
authored andcommitted
fix: new version of grpc causes linting issues if these aren't implemented (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)
1 parent 832f604 commit 6983a25

File tree

1 file changed

+8
-0
lines changed
  • ext/opentelemetry-ext-grpc/src/opentelemetry/ext/grpc/grpcext

1 file changed

+8
-0
lines changed

Diff for: ext/opentelemetry-ext-grpc/src/opentelemetry/ext/grpc/grpcext/_interceptor.py

+8
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,14 @@ def close(self):
231231
)
232232
self._channel.close()
233233

234+
def __enter__(self):
235+
"""Enters the runtime context related to the channel object."""
236+
raise NotImplementedError()
237+
238+
def __exit__(self, exc_type, exc_val, exc_tb):
239+
"""Exits the runtime context related to the channel object."""
240+
raise NotImplementedError()
241+
234242

235243
def intercept_channel(channel, *interceptors):
236244
result = channel

0 commit comments

Comments
 (0)