From a77442ab635fa3fa6a7bc331230c82e407b136e7 Mon Sep 17 00:00:00 2001 From: Thomas Borgen Date: Sat, 22 Aug 2026 20:31:25 +0200 Subject: [PATCH 1/2] Fix types from input, htmx and anchor tags --- hypermedia/types/attributes.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hypermedia/types/attributes.py b/hypermedia/types/attributes.py index 5cb6f5e..94553bb 100644 --- a/hypermedia/types/attributes.py +++ b/hypermedia/types/attributes.py @@ -99,7 +99,9 @@ class HtmxAttrs(Attrs, total=False): | str, Alias("hx-swap"), ] - hx_swap_oob: Annotated[Literal["true", "false"], Alias("hx-swap-oob")] + hx_swap_oob: Annotated[ + Literal["true", "false", "delete"] | str, Alias("hx-swap-oob") + ] hx_vals: Annotated[str, Alias("hx-vals")] # TODO: dict hx_sync: Annotated[str, Alias("hx-sync")] hx_boost: Annotated[Literal["true", "false"], Alias("hx-boost")] @@ -315,9 +317,9 @@ class InputAttrs(GlobalAttrs, total=False): formtarget: str height: int list: str - max: int + max: str | int maxlength: int - min: int + min: str | int minlength: int multiple: bool name: str @@ -457,7 +459,7 @@ class FormAttrs(GlobalAttrs, total=False): class HyperlinkAttrs(GlobalAttrs, total=False): """Attributes for `` elements.""" - download: str + download: str | bool href: str hreflang: str media: str From 1908fedb9c478011922ada046b4e656d185baad3 Mon Sep 17 00:00:00 2001 From: Thomas Borgen Date: Sat, 22 Aug 2026 20:39:49 +0200 Subject: [PATCH 2/2] Add changelog entry pinned at 6.0.2 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb31342..5f70464 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,15 @@ ## Latest Changes +## Version 6.0.2 + +### Features + +* Add `bool` type for `download` attribute in `HyperlinkAttrs`. Type is now `str | bool` +* Add `delete` and `| str` types for `hx_swap_oob` in `HtmxAttrs`. Type is now `Literal["true", "false", "delete"] | str` +* Add `str` type for `max` attribute in `InputAttrs`. Type is now `str | int` +* Add `str` type for `min` attribute in `InputAttrs`. Type is now `str | int` + ## Version 6.0.1 ### Fix