MCPcopy Index your code
hub / github.com/evalplus/evalplus / has_return_statement

Function has_return_statement

evalplus/sanitize.py:102–107  ·  view source on GitHub ↗
(node: Node)

Source from the content-addressed store, hash-verified

100
101
102def has_return_statement(node: Node) -> bool:
103 traverse_nodes = traverse_tree(node)
104 for node in traverse_nodes:
105 if node.type == RETURN_TYPE:
106 return True
107 return False
108
109
110def extract_target_code_or_empty(code: str, entrypoint: Optional[str] = None) -> str:

Callers 1

Calls 1

traverse_treeFunction · 0.85

Tested by

no test coverage detected