Lines Matching refs:eval_ctx
354 def as_const(self, eval_ctx=None):
363 the `eval_ctx` parameter was added.
378 def as_const(self, eval_ctx=None):
379 eval_ctx = get_eval_context(self, eval_ctx)
386 return f(self.left.as_const(eval_ctx), self.right.as_const(eval_ctx))
397 def as_const(self, eval_ctx=None):
398 eval_ctx = get_eval_context(self, eval_ctx)
405 return f(self.node.as_const(eval_ctx))
438 def as_const(self, eval_ctx=None):
457 def as_const(self, eval_ctx=None):
458 eval_ctx = get_eval_context(self, eval_ctx)
459 if eval_ctx.volatile:
461 if eval_ctx.autoescape:
473 def as_const(self, eval_ctx=None):
474 eval_ctx = get_eval_context(self, eval_ctx)
475 return tuple(x.as_const(eval_ctx) for x in self.items)
488 def as_const(self, eval_ctx=None):
489 eval_ctx = get_eval_context(self, eval_ctx)
490 return [x.as_const(eval_ctx) for x in self.items]
499 def as_const(self, eval_ctx=None):
500 eval_ctx = get_eval_context(self, eval_ctx)
501 return dict(x.as_const(eval_ctx) for x in self.items)
508 def as_const(self, eval_ctx=None):
509 eval_ctx = get_eval_context(self, eval_ctx)
510 eval_ctx), self.value.as_const(eval_ctx)
517 def as_const(self, eval_ctx=None):
518 eval_ctx = get_eval_context(self, eval_ctx)
519 return self.key, self.value.as_const(eval_ctx)
528 def as_const(self, eval_ctx=None):
529 eval_ctx = get_eval_context(self, eval_ctx)
530 if self.test.as_const(eval_ctx):
531 return self.expr1.as_const(eval_ctx)
537 return self.expr2.as_const(eval_ctx)
549 def as_const(self, eval_ctx=None):
550 eval_ctx = get_eval_context(self, eval_ctx)
551 if eval_ctx.volatile or self.node is None:
561 obj = self.node.as_const(eval_ctx)
562 args = [x.as_const(eval_ctx) for x in self.args]
564 args.insert(0, eval_ctx)
567 kwargs = dict(x.as_const(eval_ctx) for x in self.kwargs)
570 args.extend(self.dyn_args.as_const(eval_ctx))
575 kwargs.update(self.dyn_kwargs.as_const(eval_ctx))
600 def as_const(self, eval_ctx=None):
601 eval_ctx = get_eval_context(self, eval_ctx)
602 if eval_ctx.volatile:
604 obj = self.node.as_const(eval_ctx)
607 args = [x.as_const(eval_ctx) for x in self.args]
612 args.insert(0, eval_ctx)
616 kwargs = dict(x.as_const(eval_ctx) for x in self.kwargs)
619 args.extend(self.dyn_args.as_const(eval_ctx))
624 kwargs.update(self.dyn_kwargs.as_const(eval_ctx))
637 def as_const(self, eval_ctx=None):
638 eval_ctx = get_eval_context(self, eval_ctx)
642 return self.environment.getitem(self.node.as_const(eval_ctx),
643 self.arg.as_const(eval_ctx))
657 def as_const(self, eval_ctx=None):
661 eval_ctx = get_eval_context(self, eval_ctx)
662 return self.environment.getattr(self.node.as_const(eval_ctx),
677 def as_const(self, eval_ctx=None):
678 eval_ctx = get_eval_context(self, eval_ctx)
682 return obj.as_const(eval_ctx)
692 def as_const(self, eval_ctx=None):
693 eval_ctx = get_eval_context(self, eval_ctx)
694 return ''.join(text_type(x.as_const(eval_ctx)) for x in self.nodes)
703 def as_const(self, eval_ctx=None):
704 eval_ctx = get_eval_context(self, eval_ctx)
705 result = value = self.expr.as_const(eval_ctx)
708 new_value = op.expr.as_const(eval_ctx)
767 def as_const(self, eval_ctx=None):
768 eval_ctx = get_eval_context(self, eval_ctx)
769 return self.left.as_const(eval_ctx) and self.right.as_const(eval_ctx)
776 def as_const(self, eval_ctx=None):
777 eval_ctx = get_eval_context(self, eval_ctx)
778 return self.left.as_const(eval_ctx) or self.right.as_const(eval_ctx)
843 def as_const(self, eval_ctx=None):
844 eval_ctx = get_eval_context(self, eval_ctx)
845 return Markup(self.expr.as_const(eval_ctx))
856 def as_const(self, eval_ctx=None):
857 eval_ctx = get_eval_context(self, eval_ctx)
858 if eval_ctx.volatile:
860 expr = self.expr.as_const(eval_ctx)
861 if eval_ctx.autoescape: