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

Method __init__

tools/inspector_protocol/jinja2/runtime.py:157–173  ·  view source on GitHub ↗
(self, environment, parent, name, blocks)

Source from the content-addressed store, hash-verified

155 _fast_resolve_mode = False
156
157 def __init__(self, environment, parent, name, blocks):
158 self.parent = parent
159 self.vars = {}
160 self.environment = environment
161 self.eval_ctx = EvalContext(self.environment, name)
162 self.exported_vars = set()
163 self.name = name
164
165 # create the initial mapping of blocks. Whenever template inheritance
166 # takes place the runtime will update this mapping with the new blocks
167 # from the template.
168 self.blocks = dict((k, [v]) for k, v in iteritems(blocks))
169
170 # In case we detect the fast resolve mode we can set up an alias
171 # here that bypasses the legacy code logic.
172 if self._fast_resolve_mode:
173 self.resolve_or_missing = MethodType(resolve_or_missing, self)
174
175 def super(self, name, current):
176 """Render a parent block."""

Callers

nothing calls this directly

Calls 2

EvalContextClass · 0.90
setFunction · 0.50

Tested by

no test coverage detected