MCPcopy Index your code
hub / github.com/googleapis/google-api-python-client / emitEnd

Method emitEnd

googleapiclient/schema.py:218–232  ·  view source on GitHub ↗

Add text and comment to the output with line terminator. Args: text: string, Text to output. comment: string, Python comment.

(self, text, comment)

Source from the content-addressed store, hash-verified

216 self.value.extend([" " * self.dent, text])
217
218 def emitEnd(self, text, comment):
219 """Add text and comment to the output with line terminator.
220
221 Args:
222 text: string, Text to output.
223 comment: string, Python comment.
224 """
225 if comment:
226 divider = "\n" + " " * (self.dent + 2) + "# "
227 lines = comment.splitlines()
228 lines = [x.rstrip() for x in lines]
229 comment = divider.join(lines)
230 self.value.extend([text, " # ", comment, "\n"])
231 else:
232 self.value.extend([text, "\n"])
233
234 def indent(self):
235 """Increase indentation level."""

Callers 1

_to_str_implMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected