MCPcopy Create free account
hub / github.com/apache/tvm / indent

Method indent

python/tvm/relax/testing/ast_printer.py:67–74  ·  view source on GitHub ↗

Indent all lines of the input.

(self, text: str)

Source from the content-addressed store, hash-verified

65 return super().visit_expr(expr)
66
67 def indent(self, text: str) -> str:
68 """
69 Indent all lines of the input.
70 """
71 if text == "":
72 return ""
73 lines = text.split("\n")
74 return self.indent_str + f"\n{self.indent_str}".join(lines)
75
76 def build_ast_node(self, nodename: str, force_newline=False, **kwargs: str) -> str:
77 """

Callers 4

describeFunction · 0.80
displayFunction · 0.80
show_failure_helpFunction · 0.80
ping_reviewers.pyFile · 0.80

Calls 2

splitMethod · 0.45
joinMethod · 0.45

Tested by 2

displayFunction · 0.64
show_failure_helpFunction · 0.64