code_utils.py

Tools for working with code.

openmdao.utils.code_utils.get_nested_calls(class_, method_name, stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)[source]

Display the call tree for the specified class method and all ‘self’ class methods it calls.

Parameters
class_class

The starting class.

method_namestr

The name of the class method.

streamfile-like

The output stream where output will be displayed.

Returns
networkx.DiGraph

A graph containing edges from methods to their sub-methods.