Skip to content

Commit 9ce3561

Browse files
authored
Merge pull request #14 from marcuslimdw/make-htmx-request-generic
feat: Make HTMXRequest generic
2 parents da58f17 + df37040 commit 9ce3561

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

litestar_htmx/request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
from contextlib import suppress
44
from functools import cached_property
5-
from typing import TYPE_CHECKING, Any
5+
from typing import TYPE_CHECKING, Any, Generic
66
from urllib.parse import unquote, urlsplit, urlunsplit
77

88
from litestar import Request
9-
from litestar.connection.base import empty_receive, empty_send
9+
from litestar.connection.base import AuthT, StateT, UserT, empty_receive, empty_send
1010
from litestar.exceptions import SerializationException
1111
from litestar.serialization import decode_json
1212

@@ -103,7 +103,7 @@ def triggering_event(self) -> Any:
103103
return None
104104

105105

106-
class HTMXRequest(Request):
106+
class HTMXRequest(Generic[UserT, AuthT, StateT], Request[UserT, AuthT, StateT]):
107107
"""HTMX Request class to work with HTMX client."""
108108

109109
__slots__ = ("htmx",)

0 commit comments

Comments
 (0)