Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Workflow
2. Clone your fork locally with git
3. `Set up the environment <#setting-up-the-environment>`_
4. Make your changes
5. Run ``male lint`` to run linters and formatters. This step is optional and will be executed
5. Run ``make lint`` to run linters and formatters. This step is optional and will be executed
automatically by git before you make a commit, but you may want to run it manually in order to apply fixes
6. Commit your changes to git
7. Push the changes to your fork
Expand Down
2 changes: 2 additions & 0 deletions litestar_htmx/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def __init__(
source: str | None = None,
event: str | None = None,
target: str | None = None,
select: str | None = None,
swap: ReSwapMethod | None = None,
hx_headers: dict[str, Any] | None = None,
values: dict[str, str] | None = None,
Expand All @@ -155,6 +156,7 @@ def __init__(
source=source,
event=event,
target=target,
select=select,
swap=swap,
values=values,
hx_headers=hx_headers,
Expand Down
1 change: 1 addition & 0 deletions litestar_htmx/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class LocationType(TypedDict):
source: str | None
event: str | None
target: str | None
select: str | None
swap: ReSwapMethod | None
values: dict[str, str] | None
hx_headers: dict[str, Any] | None
Expand Down
3 changes: 2 additions & 1 deletion tests/test_htmx_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ def handler() -> HXLocation:
source="#button",
event="click",
target="#content",
select="#content",
swap="innerHTML",
hx_headers={"attribute": "value"},
values={"action": "true"},
Expand All @@ -230,7 +231,7 @@ def handler() -> HXLocation:
assert response.status_code == HTTP_200_OK
assert "Location" not in response.headers
assert spec == (
'{"path":"/contact-us","source":"#button","event":"click","target":"#content","swap":"innerHTML",'
'{"path":"/contact-us","source":"#button","event":"click","target":"#content","select":"#content","swap":"innerHTML",'
'"values":{"action":"true"},"hx_headers":{"attribute":"value"}}'
)

Expand Down
Loading