From 45c18b69ba3ad1857cd07e7f53916d8951defbb3 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 15 Jul 2025 21:39:41 +0200 Subject: [PATCH] Ignore {% --- tests/integration/test_get_app_conf_paths.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/integration/test_get_app_conf_paths.py b/tests/integration/test_get_app_conf_paths.py index 0769299e..71850534 100644 --- a/tests/integration/test_get_app_conf_paths.py +++ b/tests/integration/test_get_app_conf_paths.py @@ -67,8 +67,12 @@ class TestGetAppConfPaths(unittest.TestCase): except Exception: continue for m in cls.pattern.finditer(text): - lineno = text.count('\n', 0, m.start()) + 1 - app_arg, path_arg = m.group(1).strip(), m.group(2).strip() + lineno = text.count('\n', 0, m.start()) + 1 + app_arg = m.group(1).strip() + path_arg = m.group(2).strip() + # ignore any templated Jinja2 raw-blocks + if '{%' in path_arg: + continue if (app_arg.startswith("'") and app_arg.endswith("'")) or (app_arg.startswith('"') and app_arg.endswith('"')): app_id = app_arg.strip("'\"") cls.literal_paths.setdefault(app_id, {}).setdefault(path_arg, []).append((file_path, lineno))