Skip to content

Commit 66d4eb9

Browse files
committed
Added implicit return to TraceAll
1 parent eda6095 commit 66d4eb9

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

src/dynapyt/analyses/TraceAll.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,32 @@ def _yield(
772772
"""
773773
self.log(iid, " Yielding", value)
774774

775+
def implicit_return(
776+
self, dyn_ast: str, iid: int, function_iid: int, function_name: str, value: Any
777+
) -> Any:
778+
"""Hook for exiting a function without a return or yield (by reaching the end of function body).
779+
780+
781+
Parameters
782+
----------
783+
dyn_ast : str
784+
The path to the original code. Can be used to extract the syntax tree.
785+
786+
iid: int
787+
ID unique to the current file, referring to the function definition.
788+
789+
function_iid: int
790+
ID unique to the current file, referring to the function definition.
791+
792+
function_name: str
793+
Name of the function exiting.
794+
795+
value : Any
796+
The value returned (None).
797+
798+
"""
799+
self.log(iid, " Exiting function")
800+
775801
# Function Call
776802

777803
def pre_call(

0 commit comments

Comments
 (0)