MCPcopy Index your code
hub / github.com/python/cpython / maybe_newline

Method maybe_newline

Lib/_ast_unparse.py:84–87  ·  view source on GitHub ↗

Adds a newline if it isn't the start of generated source

(self)

Source from the content-addressed store, hash-verified

82 self.interleave(lambda: self.write(", "), traverser, items)
83
84 def maybe_newline(self):
85 """Adds a newline if it isn't the start of generated source"""
86 if self._source:
87 self.write("\n")
88
89 def maybe_semicolon(self):
90 """Adds a "; " delimiter if it isn't the start of generated source"""

Callers 3

fillMethod · 0.95
visit_ClassDefMethod · 0.95
_function_helperMethod · 0.95

Calls 1

writeMethod · 0.95

Tested by

no test coverage detected