Skip to content

Commit

Permalink
fix: remove litestar.contrib reference
Browse files Browse the repository at this point in the history
  • Loading branch information
cofin authored Oct 20, 2024
2 parents b61f136 + 9805cae commit 95ecf7d
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 17 deletions.
3 changes: 2 additions & 1 deletion litestar_htmx/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@

from litestar import Request
from litestar.connection.base import empty_receive, empty_send
from litestar.contrib.htmx._utils import HTMXHeaders
from litestar.exceptions import SerializationException
from litestar.serialization import decode_json

from litestar_htmx._utils import HTMXHeaders

__all__ = ("HTMXDetails", "HTMXRequest", "HTMXHeaders")


Expand Down
9 changes: 5 additions & 4 deletions litestar_htmx/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@
from urllib.parse import quote

from litestar import Response
from litestar.contrib.htmx._utils import HTMX_STOP_POLLING, get_headers
from litestar.contrib.htmx.types import (
from litestar.response import Template
from litestar.status_codes import HTTP_200_OK

from litestar_htmx._utils import HTMX_STOP_POLLING, get_headers
from litestar_htmx.types import (
EventAfterType,
HtmxHeaderType,
LocationType,
PushUrlType,
ReSwapMethod,
TriggerEventType,
)
from litestar.response import Template
from litestar.status_codes import HTTP_200_OK

__all__ = (
"ClientRedirect",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ maintainers = [
name = "litestar-htmx"
readme = "README.md"
requires-python = ">=3.8, <4.0"
version = "0.2.0"
version = "0.2.1"

[build-system]
build-backend = "hatchling.build"
Expand Down
5 changes: 3 additions & 2 deletions tests/test_htmx_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import pytest
from litestar import MediaType, get
from litestar.contrib.htmx._utils import HTMXHeaders
from litestar.contrib.htmx.request import HTMXRequest
from litestar.status_codes import HTTP_200_OK
from litestar.testing import create_test_client

from litestar_htmx._utils import HTMXHeaders
from litestar_htmx.request import HTMXRequest

pytestmark = pytest.mark.anyio


Expand Down
17 changes: 9 additions & 8 deletions tests/test_htmx_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@

import pytest
from litestar import get
from litestar.contrib.htmx._utils import HTMXHeaders
from litestar.contrib.htmx.request import HTMXRequest
from litestar.contrib.htmx.response import (
from litestar.contrib.jinja import JinjaTemplateEngine
from litestar.contrib.mako import MakoTemplateEngine
from litestar.status_codes import HTTP_200_OK, HTTP_500_INTERNAL_SERVER_ERROR
from litestar.template.config import TemplateConfig
from litestar.testing import create_test_client

from litestar_htmx._utils import HTMXHeaders
from litestar_htmx.request import HTMXRequest
from litestar_htmx.response import (
ClientRedirect,
ClientRefresh,
HTMXTemplate,
Expand All @@ -17,11 +23,6 @@
Retarget,
TriggerEvent,
)
from litestar.contrib.jinja import JinjaTemplateEngine
from litestar.contrib.mako import MakoTemplateEngine
from litestar.status_codes import HTTP_200_OK, HTTP_500_INTERNAL_SERVER_ERROR
from litestar.template.config import TemplateConfig
from litestar.testing import create_test_client

pytestmark = pytest.mark.anyio

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 95ecf7d

Please sign in to comment.