contracts.rules_fragment_scope

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

Fragment/block render scope contract checks.

Fragment/block render scope contract checks.

contracts.rules_fragment_scope

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

_ScopedBinding
class
_extract_name_targets
function
def _extract_name_targets(expr: object) -> frozenset[str]

Return names assigned by a Kida target expression.

Parameters

Name Type Default Description
expr object
_binding_names
function
def _binding_names(node: object) -> frozenset[tuple[str, str]]

Return(name, kind)pairs introduced by one Kida AST node.

Parameters

Name Type Default Description
node object
check_fragment_block_scope
function
def check_fragment_block_scope(template_sources: Mapping[str, str], kida_env: Environment | None) -> list[ContractIssue]

Warn when fragment blocks depend on ancestor-block local bindings.

Parameters

Name Type Default Description
template_sources Mapping[str, str]
kida_env Environment | None

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