contracts.rules_htmx

Page actions AI-ready formats and sharing
Open LLM text
Share with AI
Ask Claude Ask ChatGPT Ask Gemini Ask Copilot

htmx selector/value checks.

htmx selector/value checks.

contracts.rules_htmx

Name Type Default Description
type
qualified_name
element_type
description
source_file
line_number
is_autodoc
autodoc_element
_autodoc_template
_autodoc_url_path
_autodoc_page_type
title
doc_content_hash

Symbols on this page

check_hx_target_selectors
function
def check_hx_target_selectors(template_sources: dict[str, str], all_ids: set[str], *, literal_selectors: dict[str, list[str]] | None = None) -> tuple[list[ContractIssue], int]

Validate #id hx-target selectors against known static ids.

Parameters

Name Type Default Description
template_sources dict[str, str]
all_ids set[str]
literal_selectors dict[str, list[str]] | None None
check_hx_indicator_selectors
function
def check_hx_indicator_selectors(template_sources: dict[str, str], all_ids: set[str]) -> list[ContractIssue]

Validate #id hx-indicator selectors.

Parameters

Name Type Default Description
template_sources dict[str, str]
all_ids set[str]
check_hx_boost
function
def check_hx_boost(template_sources: dict[str, str]) -> list[ContractIssue]

Validate hx-boost values are true/false.

Parameters

Name Type Default Description
template_sources dict[str, str]
_is_balanced_selector
function
def _is_balanced_selector(value: str) -> bool

Best-effort balancing check for () and [] in selector values.

Parameters

Name Type Default Description
value str
_selector_syntax_error
function
def _selector_syntax_error(value: str) -> str | None

Return an error message when selector value is clearly invalid.

Parameters

Name Type Default Description
value str
check_selector_syntax
function
def check_selector_syntax(template_sources: dict[str, str]) -> list[ContractIssue]

Validate static selector-bearing HTMX attribute values.

Parameters

Name Type Default Description
template_sources dict[str, str]

View source · /home/runner/work/chirp/chirp/site/../src/chirp/contracts/rules_htmx.py:1