0c0feda83426ce807d69bbd0f51085e07aad10b9,homeassistant/helpers/template.py,,render,#Any#Any#Any#,42
Before Change
utcnow = dt_util.utcnow()
try:
return ENV.from_string(template, {
"closest": location_methods.closest,
"distance": location_methods.distance,
"float": forgiving_float,
"is_state": hass.states.is_state,
"is_state_attr": hass.states.is_state_attr,
"now": dt_util.as_local(utcnow),
"states": AllStates(hass),
"utcnow": utcnow,
"as_timestamp": dt_util.as_timestamp,
"relative_time": dt_util.get_age
}).render(kwargs).strip()
except jinja2.TemplateError as err:
raise TemplateError(err)
After Change
kwargs.update(variables)
try:
if not isinstance(template, jinja2.Template):
template = compile_template(hass, template)
return template.render(kwargs).strip()
except jinja2.TemplateError as err:
raise TemplateError(err)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: home-assistant/home-assistant
Commit Name: 0c0feda83426ce807d69bbd0f51085e07aad10b9
Time: 2016-09-25
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/helpers/template.py
Class Name:
Method Name: render
Project Name: mindsdb/mindsdb
Commit Name: 3c8bfbcdc608b0a868e655d647da3c8a33aa7449
Time: 2020-07-23
Author: stpmax@yandex.ru
File Name: mindsdb/api/mysql/mysql_proxy/classes/sql_query.py
Class Name: SQLQuery
Method Name: parse_insert
Project Name: deepmipt/DeepPavlov
Commit Name: c3a9468a86a0abdf78c9a8d55a0147b0a61fb16b
Time: 2018-02-05
Author: arkhipov@yahoo.com
File Name: deeppavlov/models/ner/ner.py
Class Name: NER
Method Name: infer