MCPcopy Create free account
hub / github.com/nodejs/node / __init__

Method __init__

deps/v8/third_party/jinja2/runtime.py:163–182  ·  view source on GitHub ↗
(
        self,
        environment: "Environment",
        parent: t.Dict[str, t.Any],
        name: t.Optional[str],
        blocks: t.Dict[str, t.Callable[["Context"], t.Iterator[str]]],
        globals: t.Optional[t.MutableMapping[str, t.Any]] = None,
    )

Source from the content-addressed store, hash-verified

161 """
162
163 def __init__(
164 self,
165 environment: "Environment",
166 parent: t.Dict[str, t.Any],
167 name: t.Optional[str],
168 blocks: t.Dict[str, t.Callable[["Context"], t.Iterator[str]]],
169 globals: t.Optional[t.MutableMapping[str, t.Any]] = None,
170 ):
171 self.parent = parent
172 self.vars: t.Dict[str, t.Any] = {}
173 self.environment: "Environment" = environment
174 self.eval_ctx = EvalContext(self.environment, name)
175 self.exported_vars: t.Set[str] = set()
176 self.name = name
177 self.globals_keys = set() if globals is None else set(globals)
178
179 # create the initial mapping of blocks. Whenever template inheritance
180 # takes place the runtime will update this mapping with the new blocks
181 # from the template.
182 self.blocks = {k: [v] for k, v in blocks.items()}
183
184 def super(
185 self, name: str, current: t.Callable[["Context"], t.Iterator[str]]

Callers

nothing calls this directly

Calls 3

EvalContextClass · 0.70
setFunction · 0.50
itemsMethod · 0.45

Tested by

no test coverage detected