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

Function args_as_const

deps/v8/third_party/jinja2/nodes.py:716–734  ·  view source on GitHub ↗
(
    node: t.Union["_FilterTestCommon", "Call"], eval_ctx: t.Optional[EvalContext]
)

Source from the content-addressed store, hash-verified

714
715
716def args_as_const(
717 node: t.Union["_FilterTestCommon", "Call"], eval_ctx: t.Optional[EvalContext]
718) -> t.Tuple[t.List[t.Any], t.Dict[t.Any, t.Any]]:
719 args = [x.as_const(eval_ctx) for x in node.args]
720 kwargs = dict(x.as_const(eval_ctx) for x in node.kwargs)
721
722 if node.dyn_args is not None:
723 try:
724 args.extend(node.dyn_args.as_const(eval_ctx))
725 except Exception as e:
726 raise Impossible() from e
727
728 if node.dyn_kwargs is not None:
729 try:
730 kwargs.update(node.dyn_kwargs.as_const(eval_ctx))
731 except Exception as e:
732 raise Impossible() from e
733
734 return args, kwargs
735
736
737class _FilterTestCommon(Expr):

Callers 1

as_constMethod · 0.70

Calls 4

ImpossibleClass · 0.70
updateMethod · 0.65
as_constMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected