From d4d7a68d7a94f0ca33f21f1de69ebe057d33cdf9 Mon Sep 17 00:00:00 2001 From: nikto_b Date: Thu, 16 Oct 2025 20:51:19 +0300 Subject: [PATCH] Fix dict body validation --- pyproject.toml | 2 +- src/megasniff/templates/deflator.jinja2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5253265..0177815 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "megasniff" -version = "0.2.5.post1" +version = "0.2.5.post2" description = "Library for in-time codegened type validation" authors = [ { name = "nikto_b", email = "niktob560@yandex.ru" } diff --git a/src/megasniff/templates/deflator.jinja2 b/src/megasniff/templates/deflator.jinja2 index bf6ee5c..9e735b9 100644 --- a/src/megasniff/templates/deflator.jinja2 +++ b/src/megasniff/templates/deflator.jinja2 @@ -20,7 +20,7 @@ if not isinstance({{from_container}}, dict): {% endif %} for k_{{hashname(unwrapping)}}, v_{{hashname(unwrapping)}} in {{from_container}}.items(): {{ render_unwrap(unwrapping.key_unwrap, 'k_' + hashname(unwrapping), 'k_' + hashname(unwrapping)) | indent(4) }} -{{ render_unwrap(unwrapping.value_unwrap, into_container + '[v_' + hashname(unwrapping) + ']', 'v_' + hashname(unwrapping)) | indent(4) }} +{{ render_unwrap(unwrapping.value_unwrap, 'v_' + hashname(unwrapping), into_container + '[v_' + hashname(unwrapping) + ']') | indent(4) }} {%- endset %} {{out}} {%- endmacro %}