Classes
TemplateValidator
Validates templates for syntax errors and missing dependencies.
TemplateValidator
Validates templates for syntax errors and missing dependencies.
Methods 1
validate_all
Validate all templates in the theme.
validate_all
def validate_all(self) -> list[Any]
Validate all templates in the theme.
Returns
List of errors foundlist[Any]
—
Internal Methods 3
__init__
Initialize validator.
__init__
def __init__(self, template_engine: Any)
Initialize validator.
Parameters 1
template_engine |
Any |
TemplateEngine instance |
_validate_syntax
Validate template syntax.
_validate_syntax
def _validate_syntax(self, template_name: str, template_path: Path) -> list[Any]
Validate template syntax.
Parameters 2
template_name |
str |
|
template_path |
Path |
Returns
list[Any]
_validate_includes
Check if all included templates exist.
_validate_includes
def _validate_includes(self, template_name: str, template_path: Path) -> list[Any]
Check if all included templates exist.
Parameters 2
template_name |
str |
|
template_path |
Path |
Returns
list[Any]
Functions
validate_templates
Validate all templates and display results.
validate_templates
def validate_templates(template_engine: Any) -> int
Validate all templates and display results.
Parameters 1
| Name | Type | Default | Description |
|---|---|---|---|
template_engine |
Any |
— | TemplateEngine instance |
Returns
Number of errors foundint
—