From 9805cae7580b64a82338d59260775535e4e7227b Mon Sep 17 00:00:00 2001 From: Cody Fincher Date: Sun, 20 Oct 2024 20:09:02 +0000 Subject: [PATCH] fix: updated reference --- litestar_htmx/request.py | 3 ++- litestar_htmx/response.py | 9 +++++---- pyproject.toml | 2 +- tests/test_htmx_request.py | 5 +++-- tests/test_htmx_response.py | 17 +++++++++-------- uv.lock | 2 +- 6 files changed, 21 insertions(+), 17 deletions(-) diff --git a/litestar_htmx/request.py b/litestar_htmx/request.py index 8d48553..d9b0b58 100644 --- a/litestar_htmx/request.py +++ b/litestar_htmx/request.py @@ -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") diff --git a/litestar_htmx/response.py b/litestar_htmx/response.py index 0a56e1f..74a49e7 100644 --- a/litestar_htmx/response.py +++ b/litestar_htmx/response.py @@ -4,8 +4,11 @@ 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, @@ -13,8 +16,6 @@ ReSwapMethod, TriggerEventType, ) -from litestar.response import Template -from litestar.status_codes import HTTP_200_OK __all__ = ( "ClientRedirect", diff --git a/pyproject.toml b/pyproject.toml index 9e74804..0d1f634 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" diff --git a/tests/test_htmx_request.py b/tests/test_htmx_request.py index ef02aed..7bca45d 100644 --- a/tests/test_htmx_request.py +++ b/tests/test_htmx_request.py @@ -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 diff --git a/tests/test_htmx_response.py b/tests/test_htmx_response.py index 4639704..6489db1 100644 --- a/tests/test_htmx_response.py +++ b/tests/test_htmx_response.py @@ -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, @@ -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 diff --git a/uv.lock b/uv.lock index 7a21568..392b73b 100644 --- a/uv.lock +++ b/uv.lock @@ -663,7 +663,7 @@ mako = [ [[package]] name = "litestar-htmx" -version = "0.2.0" +version = "0.2.1" source = { editable = "." } dependencies = [ { name = "litestar" },