Skip to content

Commit e67337e

Browse files
Consistent import
1 parent c967d0d commit e67337e

File tree

1 file changed

+6
-13
lines changed
  • instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql

1 file changed

+6
-13
lines changed

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

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,8 @@
108108
"""
109109

110110
import logging
111+
import typing
111112
from importlib import import_module
112-
from typing import (
113-
Any,
114-
Callable,
115-
Collection,
116-
Dict,
117-
Optional,
118-
Tuple,
119-
)
120113

121114
import mysql.connector
122115
import wrapt
@@ -142,7 +135,7 @@ class MySQLInstrumentor(BaseInstrumentor):
142135

143136
_DATABASE_SYSTEM = "mysql"
144137

145-
def instrumentation_dependencies(self) -> Collection[str]:
138+
def instrumentation_dependencies(self) -> typing.Collection[str]:
146139
return _instruments
147140

148141
def _instrument(self, **kwargs):
@@ -174,7 +167,7 @@ def _uninstrument(self, **kwargs):
174167
def instrument_connection(
175168
self,
176169
connection,
177-
tracer_provider: Optional[trace_api.TracerProvider] = None,
170+
tracer_provider: typing.Optional[trace_api.TracerProvider] = None,
178171
enable_commenter: bool = False,
179172
commenter_options: dict = None,
180173
):
@@ -225,9 +218,9 @@ def uninstrument_connection(
225218
class DatabaseApiIntegration(dbapi.DatabaseApiIntegration):
226219
def wrapped_connection(
227220
self,
228-
connect_method: Callable[..., Any],
229-
args: Tuple[Any, Any],
230-
kwargs: Dict[Any, Any],
221+
connect_method: typing.Callable[..., typing.Any],
222+
args: typing.Tuple[typing.Any, typing.Any],
223+
kwargs: typing.Dict[typing.Any, typing.Any],
231224
):
232225
"""Add object proxy to connection object."""
233226
connection = connect_method(*args, **kwargs)

0 commit comments

Comments
 (0)