Skip to content

Commit

Permalink
Add TypeAlias
Browse files Browse the repository at this point in the history
  • Loading branch information
Kludex committed Jan 2, 2025
1 parent 1bc7733 commit 6c75215
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,14 +273,15 @@ def response_hook(span: Span, environ: WSGIEnvironment, status: str, response_he
)

if TYPE_CHECKING:
from typing import TypeAlias
from wsgiref.types import StartResponse, WSGIApplication, WSGIEnvironment


T = TypeVar("T")
RequestHook = Callable[[trace.Span, "WSGIEnvironment"], None]
ResponseHook = Callable[
[trace.Span, "WSGIEnvironment", str, list[tuple[str, str]]], None
]
ResponseHook: TypeAlias = (
"Callable[[trace.Span, WSGIEnvironment, str, list[tuple[str, str]]], None]"
)

_HTTP_VERSION_PREFIX = "HTTP/"
_CARRIER_KEY_PREFIX = "HTTP_"
Expand Down

0 comments on commit 6c75215

Please sign in to comment.