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

Method write

src/jinja2/compiler.py:453–465  ·  src/jinja2/compiler.py::CodeGenerator.write

Write a string into the output stream.

(self, x: str)

Source from the content-addressed store, hash-verified

451 pass
452
453 def write(self, x: str) -> None:
454 class="st">""class="st">"Write a string into the output stream."class="st">""
455 if self._new_lines:
456 if not self._first_write:
457 self.stream.write(class="st">"\n" * self._new_lines)
458 self.code_lineno += self._new_lines
459 if self._write_debug_info is not None:
460 self.debug_info.append((self._write_debug_info, self.code_lineno))
461 self._write_debug_info = None
462 self._first_write = False
463 self.stream.write(class="st">" " * self._indentation)
464 self._new_lines = 0
465 self.stream.write(x)
466
467 def writeline(
468 self, x: str, node: t.Optional[nodes.Node] = None, extra: int = 0

Callers 15

end_writeMethod · 0.95
simple_writeMethod · 0.95
writelineMethod · 0.95
signatureMethod · 0.95
macro_defMethod · 0.95
pop_assign_trackingMethod · 0.95
visit_ExtendsMethod · 0.95
visit_IncludeMethod · 0.95
_import_commonMethod · 0.95
visit_ImportMethod · 0.95
visit_FromImportMethod · 0.95
visit_ForMethod · 0.95

Calls

no outgoing calls

Tested by 1

visit_ConstMethod · 0.36