From 849c12fe886465a6418ee8b6f4f362dbe8a0acd3 Mon Sep 17 00:00:00 2001 From: Adrien Date: Thu, 24 Oct 2024 14:06:58 +0200 Subject: [PATCH] Use strict undefined (#633) --- src/betterproto/plugin/compiler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/betterproto/plugin/compiler.py b/src/betterproto/plugin/compiler.py index 7eee733..5dec11c 100644 --- a/src/betterproto/plugin/compiler.py +++ b/src/betterproto/plugin/compiler.py @@ -32,6 +32,7 @@ def outputfile_compiler(output_file: OutputTemplate) -> str: trim_blocks=True, lstrip_blocks=True, loader=jinja2.FileSystemLoader(templates_folder), + undefined=jinja2.StrictUndefined, ) # Load the body first so we have a compleate list of imports needed. body_template = env.get_template("template.py.j2")