Skip to content

Commit f940556

Browse files
committed
Make return type of query_method an awaitable
1 parent 0d8cd74 commit f940556

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 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, Awaitable, Callable, Collection, TypeVar
144144

145145
import psycopg # pylint: disable=import-self
146146
from psycopg.sql import Composed # pylint: disable=no-name-in-module
@@ -385,7 +385,7 @@ class AsyncCursorTracer(CursorTracer):
385385
async def traced_execution(
386386
self,
387387
cursor: dbapi.CursorT,
388-
query_method: Callable[..., Any],
388+
query_method: Callable[..., Awaitable[Any]],
389389
*args: tuple[Any, ...],
390390
**kwargs: dict[Any, Any],
391391
):

0 commit comments

Comments
 (0)