MCPcopy
hub / github.com/pallets/jinja / visit_Const

Method visit_Const

src/jinja2/compiler.py:1670–1675  ·  view source on GitHub ↗
(self, node: nodes.Const, frame: Frame)

Source from the content-addressed store, hash-verified

1668 self.writeline(f"{ref}[{node.attr!r}]")
1669
1670 def visit_Const(self, node: nodes.Const, frame: Frame) -> None:
1671 val = node.as_const(frame.eval_ctx)
1672 if isinstance(val, float):
1673 self.write(str(val))
1674 else:
1675 self.write(repr(val))
1676
1677 def visit_TemplateData(self, node: nodes.TemplateData, frame: Frame) -> None:
1678 try:

Callers

nothing calls this directly

Calls 2

writeMethod · 0.95
as_constMethod · 0.45

Tested by

no test coverage detected