Skip to content

Commit 4c87873

Browse files
committed
Remove wrapt TYPE_CHECKING wrap
1 parent fc46d03 commit 4c87873

File tree

1 file changed

+2
-10
lines changed
  • instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi

1 file changed

+2
-10
lines changed

instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@
4242
import functools
4343
import logging
4444
import re
45-
from typing import TYPE_CHECKING, Any, Callable, Generic, TypeVar
45+
from typing import Any, Callable, Generic, TypeVar
4646

47+
import wrapt
4748
from wrapt import wrap_function_wrapper
4849

4950
from opentelemetry import trace as trace_api
@@ -57,15 +58,6 @@
5758
from opentelemetry.trace import SpanKind, TracerProvider, get_tracer
5859
from opentelemetry.util._importlib_metadata import version as util_version
5960

60-
if TYPE_CHECKING:
61-
62-
class wrapt: # pylint: disable=invalid-name
63-
class ObjectProxy:
64-
def __init__(self, *args: Any, **kwargs: Any) -> None:
65-
pass
66-
else:
67-
import wrapt
68-
6961
_DB_DRIVER_ALIASES = {
7062
"MySQLdb": "mysqlclient",
7163
}

0 commit comments

Comments
 (0)