Skip to content

Commit bca7abb

Browse files
authored
Update example to exclude external modules (#215)
# Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed - [ ] I have read and agree to the [Contributor License Agreement](/codegen-sh/codegen-sdk/blob/develop/CLA.md)
1 parent afd98c9 commit bca7abb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/building-with-codegen/traversing-the-call-graph.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ def create_call_graph(start_func, end_func, max_depth=5):
4747
src_func = parent_func.function_definition
4848
src_call = parent_func
4949

50+
# Skip external modules
51+
if isinstance(src_func, ExternalModule):
52+
return
53+
5054
# Traverse all function calls
5155
for call in src_func.function_calls:
5256
func = call.function_definition

0 commit comments

Comments
 (0)