This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch sbp
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/sbp by this push:
new c65332d Fix a few problems in the script to check templates
c65332d is described below
commit c65332d82769769a8398d25d340c5dccca7fc913
Author: Sean B. Palmer <[email protected]>
AuthorDate: Sun Feb 8 11:31:17 2026 +0000
Fix a few problems in the script to check templates
---
scripts/check_templates.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/scripts/check_templates.py b/scripts/check_templates.py
index eed9117..6e8113e 100755
--- a/scripts/check_templates.py
+++ b/scripts/check_templates.py
@@ -25,7 +25,7 @@ from pathlib import Path
TEMPLATE_SUFFIXES = {".html", ".htm", ".j2", ".jinja"}
JINJA_REF_RE = re.compile(
- r"""{%\s*
+ r"""{%[-+]?\s*
(?:include|extends|import|from)
\s+["']([^"']+)["']
""",
@@ -54,7 +54,7 @@ def detect_cycles(graph):
def visit(node, stack):
if node in visiting:
- cycle = [*stack[stack.index(node) :], node]
+ cycle = stack[stack.index(node) :]
cycles.append(cycle)
return
if node in visited:
@@ -222,8 +222,8 @@ def main(): # noqa: C901
if missing_includes:
errors = True
print("\nMissing included templates")
- for src, refs in missing_includes.items():
- for ref in refs:
+ for src, missing_refs in missing_includes.items():
+ for ref in missing_refs:
print(f" {src} includes missing {ref}")
if duplicates:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]