Skip to content

Commit 09bbefe

Browse files
author
alrex
authored
Merge branch 'main' into instr
2 parents 865ca59 + 5b43a59 commit 09bbefe

File tree

14 files changed

+227
-209
lines changed

14 files changed

+227
-209
lines changed

docs-requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ sphinx-autodoc-typehints
88
-e "git+https://github.com/open-telemetry/opentelemetry-python.git#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions"
99
-e "git+https://github.com/open-telemetry/opentelemetry-python-contrib.git#egg=opentelemetry-instrumentation&subdirectory=opentelemetry-instrumentation"
1010
-e "git+https://github.com/open-telemetry/opentelemetry-python.git#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk"
11+
-e "git+https://github.com/open-telemetry/opentelemetry-python-contrib.git#egg=opentelemetry-util-http&subdirectory=util/opentelemetry-util-http"
1112

1213
# Required by opentelemetry-instrumentation
1314
fastapi>=0.65.2

instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/aiopg_integration.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import typing
22

33
import wrapt
4-
from aiopg.utils import _ContextManager, _PoolAcquireContextManager
4+
from aiopg.utils import ( # pylint: disable=no-name-in-module
5+
_ContextManager,
6+
_PoolAcquireContextManager,
7+
)
58

69
from opentelemetry.instrumentation.dbapi import (
710
CursorTracer,
@@ -61,7 +64,9 @@ def __init__(self, connection, *args, **kwargs):
6164

6265
def cursor(self, *args, **kwargs):
6366
coro = self._cursor(*args, **kwargs)
64-
return _ContextManager(coro)
67+
return _ContextManager( # pylint: disable=no-value-for-parameter
68+
coro
69+
)
6570

6671
async def _cursor(self, *args, **kwargs):
6772
# pylint: disable=protected-access

instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/wrappers.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@
3434

3535
import aiopg
3636
import wrapt
37-
from aiopg.utils import _ContextManager, _PoolContextManager
37+
from aiopg.utils import ( # pylint: disable=no-name-in-module
38+
_ContextManager,
39+
_PoolContextManager,
40+
)
3841

3942
from opentelemetry.instrumentation.aiopg.aiopg_integration import (
4043
AiopgIntegration,
@@ -108,7 +111,7 @@ def wrap_connect_(
108111
version=version,
109112
tracer_provider=tracer_provider,
110113
)
111-
return _ContextManager(
114+
return _ContextManager( # pylint: disable=no-value-for-parameter
112115
db_integration.wrapped_connection(wrapped, args, kwargs)
113116
)
114117

instrumentation/opentelemetry-instrumentation-aiopg/tests/test_aiopg_integration.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
from unittest.mock import MagicMock
1818

1919
import aiopg
20-
from aiopg.utils import _ContextManager, _PoolAcquireContextManager
20+
from aiopg.utils import ( # pylint: disable=no-name-in-module
21+
_ContextManager,
22+
_PoolAcquireContextManager,
23+
)
2124

2225
import opentelemetry.instrumentation.aiopg
2326
from opentelemetry import trace as trace_api
@@ -542,7 +545,7 @@ def __init__(self, database, server_port, server_host, user):
542545
# pylint: disable=no-self-use
543546
def cursor(self):
544547
coro = self._cursor()
545-
return _ContextManager(coro)
548+
return _ContextManager(coro) # pylint: disable=no-value-for-parameter
546549

547550
async def _cursor(self):
548551
return MockCursor()

instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import sys
1616
import unittest
17-
import unittest.mock as mock
17+
from unittest import mock
1818

1919
import opentelemetry.instrumentation.asgi as otel_asgi
2020
from opentelemetry import trace as trace_api

instrumentation/opentelemetry-instrumentation-grpc/tests/_server.py

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def BidirectionalStreamingMethod(self, request_iterator, context):
7979

8080

8181
def create_test_server(port):
82+
# pylint: disable=consider-using-with
8283
server = grpc.server(futures.ThreadPoolExecutor(max_workers=1))
8384

8485
test_server_pb2_grpc.add_GRPCTestServerServicer_to_server(

0 commit comments

Comments
 (0)