MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _function_helper

Method _function_helper

tools/python-3.11.9-amd64/Lib/ast.py:1037–1050  ·  view source on GitHub ↗
(self, node, fill_suffix)

Source from the content-addressed store, hash-verified

1035 self._function_helper(node, "async def")
1036
1037 def _function_helper(self, node, fill_suffix):
1038 self.maybe_newline()
1039 for deco in node.decorator_list:
1040 self.fill("@")
1041 self.traverse(deco)
1042 def_str = fill_suffix + " " + node.name
1043 self.fill(def_str)
1044 with self.delimit("(", ")"):
1045 self.traverse(node.args)
1046 if node.returns:
1047 self.write(" -> ")
1048 self.traverse(node.returns)
1049 with self.block(extra=self.get_type_comment(node)):
1050 self._write_docstring_and_traverse_body(node)
1051
1052 def visit_For(self, node):
1053 self._for_helper("for ", node)

Callers 2

visit_FunctionDefMethod · 0.95

Calls 8

maybe_newlineMethod · 0.95
fillMethod · 0.95
traverseMethod · 0.95
delimitMethod · 0.95
writeMethod · 0.95
blockMethod · 0.95
get_type_commentMethod · 0.95

Tested by

no test coverage detected