Skip to content

Commit 6c75215

Browse files
committed
Add TypeAlias
1 parent 1bc7733 commit 6c75215

File tree

1 file changed

+4
-3
lines changed
  • instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi

1 file changed

+4
-3
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -273,14 +273,15 @@ def response_hook(span: Span, environ: WSGIEnvironment, status: str, response_he
273273
)
274274

275275
if TYPE_CHECKING:
276+
from typing import TypeAlias
276277
from wsgiref.types import StartResponse, WSGIApplication, WSGIEnvironment
277278

278279

279280
T = TypeVar("T")
280281
RequestHook = Callable[[trace.Span, "WSGIEnvironment"], None]
281-
ResponseHook = Callable[
282-
[trace.Span, "WSGIEnvironment", str, list[tuple[str, str]]], None
283-
]
282+
ResponseHook: TypeAlias = (
283+
"Callable[[trace.Span, WSGIEnvironment, str, list[tuple[str, str]]], None]"
284+
)
284285

285286
_HTTP_VERSION_PREFIX = "HTTP/"
286287
_CARRIER_KEY_PREFIX = "HTTP_"

0 commit comments

Comments
 (0)