Skip to content

Conversation

@B1oko
Copy link
Contributor

@B1oko B1oko commented Jul 11, 2025

Fix issue #585

  • The get_undeclared_template_variables method now analyzes the original template, regardless of whether it has been rendered.
  • Added optional context parameter to return only variables not present in the provided context.
  • Added test tests/get_undeclared_variables.py:
    • Verifies behavior before rendering (all variables)
    • Verifies after rendering with incomplete context (only missing variables)
    • Verifies after rendering with complete context (empty set)
    • Verifies compatibility with custom Jinja2 environment
  • All tests use asserts and are ready for CI integration.

…nal template, regardless of whether it has been rendered.

- Added optional context parameter to return only variables not present in the provided context.
- Added test tests/get_undeclared_variables.py:
    - Verifies behavior before rendering (all variables)
    - Verifies after rendering with incomplete context (only missing variables)
    - Verifies after rendering with complete context (empty set)
    - Verifies compatibility with custom Jinja2 environment
- All tests use asserts and are ready for CI integration.

Closes elapouya#585
@elapouya elapouya merged commit 606d189 into elapouya:master Jul 15, 2025
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants