MCPcopy Index your code
hub / github.com/zappa/Zappa / format_invoke_command

Method format_invoke_command

zappa/cli.py:1615–1632  ·  view source on GitHub ↗

Formats correctly the string output from the invoke() method, replacing line breaks and tabs when necessary.

(self, string)

Source from the content-addressed store, hash-verified

1613 return response
1614
1615 def format_invoke_command(self, string):
1616 """
1617 Formats correctly the string output from the invoke() method,
1618 replacing line breaks and tabs when necessary.
1619 """
1620
1621 string = string.replace("\\n", "\n")
1622
1623 formated_response = ""
1624 for line in string.splitlines():
1625 if line.startswith("REPORT"):
1626 line = line.replace("\t", "\n")
1627 if line.startswith("[DEBUG]"):
1628 line = line.replace("\t", " ")
1629 formated_response += line + "\n"
1630 formated_response = formated_response.replace("\n\n", "\n")
1631
1632 return formated_response
1633
1634 def colorize_invoke_command(self, string):
1635 """

Callers 2

Calls

no outgoing calls

Tested by 1