Skip to content

Commit e3db4a8

Browse files
Fix imports after main changes
1 parent eeab531 commit e3db4a8

File tree

1 file changed

+4
-4
lines changed
  • instrumentation/opentelemetry-instrumentation-psycopg/src/opentelemetry/instrumentation/psycopg

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
from __future__ import annotations
141141

142142
import logging
143-
from typing import Any, Callable, Collection, TypeVar
143+
from typing import Any, Callable, Collection, Optional, TypeVar
144144

145145
import psycopg # pylint: disable=import-self
146146
from psycopg.sql import Composed # pylint: disable=no-name-in-module
@@ -241,7 +241,7 @@ def _uninstrument(self, **kwargs: Any):
241241
@staticmethod
242242
def instrument_connection(
243243
connection: psycopg.Connection,
244-
tracer_provider: typing.Optional[trace_api.TracerProvider] = None,
244+
tracer_provider: Optional[trace_api.TracerProvider] = None,
245245
enable_commenter: bool = False,
246246
commenter_options: dict = None,
247247
enable_attribute_commenter: bool = False,
@@ -361,8 +361,8 @@ def get_statement(self, cursor: CursorT, args: list[Any]) -> str:
361361

362362
def _new_cursor_factory(
363363
db_api: dbapi.DatabaseApiIntegration = None,
364-
base_factory: pg_cursor = None,
365-
tracer_provider: typing.Optional[trace_api.TracerProvider] = None,
364+
base_factory: psycopg.Cursor = None,
365+
tracer_provider: Optional[trace_api.TracerProvider] = None,
366366
enable_commenter: bool = False,
367367
commenter_options: dict = None,
368368
enable_attribute_commenter: bool = False,

0 commit comments

Comments
 (0)