Compare commits

...

1 commit

Author SHA1 Message Date
87ee83d3ee
Fix tests
Some checks failed
CI / test (push) Successful in 45s
CI / test (debian, docker.io/library/debian:13, python3) (push) Failing after 1m17s
Lint / test (push) Successful in 37s
2026-06-29 13:27:05 +10:00
4 changed files with 1 additions and 23 deletions

View file

@ -448,18 +448,6 @@ def generate_jinja2_template(
return template
def _template_variable_names(
role_prefix: str,
flat_items: list[tuple[tuple[str, ...], Any]],
loop_candidates: list[LoopCandidate] | None = None,
) -> set[str]:
names = {make_var_name(role_prefix, path) for path, _value in flat_items}
if loop_candidates:
for candidate in loop_candidates:
names.add(make_var_name(role_prefix, candidate.path))
return names
def _stringify_timestamps(obj: Any) -> Any:
"""
Recursively walk a parsed config and turn any datetime/date/time objects

View file

@ -2,7 +2,6 @@ from __future__ import annotations
from typing import Any
NAME = "jinja2"
TEMPLATE_EXTENSION = "j2"
JSON_VALUE_FILTER = "to_json(ensure_ascii=False)"

View file

@ -24,15 +24,6 @@ def _absolute(path: Path) -> Path:
return path if path.is_absolute() else Path.cwd() / path
def _check_existing_path_not_symlink(path: Path) -> None:
try:
st = path.lstat()
except FileNotFoundError:
return
if stat.S_ISLNK(st.st_mode):
raise OutputPathError(f"refusing to use symlink path: {path}")
def _check_existing_output_file(path: Path) -> None:
try:
st = path.lstat()

View file

@ -187,7 +187,7 @@ def test_yaml_loop_preserves_blank_separator_after_list(tmp_path: Path):
),
]
for label, text, rendered_expected, erb_expected in cases:
for label, text, rendered_expected in cases:
path = tmp_path / f"{label}.yml"
path.write_text(text, encoding="utf-8")