New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[jinja] disable failOnUnknownTokens #16347
Conversation
Home Assistant doesn't enable strict mode, so we shouldn't either Signed-off-by: Cody Cutrer <cody@cutrer.us>
It was enabled to fix the issue: #10496 Could you please check what will Python Jinja return in the case from unit test? |
>>> from jinja2 import Environment
>>> env = Environment()
>>> tmpl = env.from_string("Hello {{ missing }}!")
>>> tmpl.render()
'Hello !' |
Note that with #16307, the situation from the issue you referenced will end up with the item updated to |
Yes, you are right. I'll double check the HASS sources, but looks like with #16307 this should be ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It would be nice to support is_defined filter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you
Home Assistant doesn't enable strict mode, so we shouldn't either Signed-off-by: Cody Cutrer <cody@cutrer.us> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Home Assistant doesn't enable strict mode, so we shouldn't either. Fixes Koenkk/zigbee2mqtt#17395