MCPcopy Index your code
hub / github.com/nodejs/node / _from_namespace

Method _from_namespace

tools/inspector_protocol/jinja2/environment.py:971–991  ·  view source on GitHub ↗
(cls, environment, namespace, globals)

Source from the content-addressed store, hash-verified

969
970 @classmethod
971 def _from_namespace(cls, environment, namespace, globals):
972 t = object.__new__(cls)
973 t.environment = environment
974 t.globals = globals
975 t.name = namespace['name']
976 t.filename = namespace['__file__']
977 t.blocks = namespace['blocks']
978
979 # render function and module
980 t.root_render_func = namespace['root']
981 t._module = None
982
983 # debug and loader helpers
984 t._debug_info = namespace['debug_info']
985 t._uptodate = None
986
987 # store the reference
988 namespace['environment'] = environment
989 namespace['__jinja_template__'] = t
990
991 return t
992
993 def render(self, *args, **kwargs):
994 """This method accepts the same arguments as the `dict` constructor:

Callers 2

from_codeMethod · 0.45
from_module_dictMethod · 0.45

Calls 1

__new__Method · 0.45

Tested by

no test coverage detected