A
depends on B
, then B
is used by A
. This relationship is tracked in both directions, allowing you to navigate the codebase from either perspective.
MyClass.dependencies
answers the question: “which symbols in the codebase does MyClass depend on?”
BaseClass.usages
answers the question: “which symbols in the codebase use BaseClass?”
dependencies
method allows you to traverse the dependency graph and collect all dependencies up to a specified depth level.
dependencies
to analyze a class inheritance chain:
max_depth
parameter helps prevent excessive recursion in large codebases or when there are cycles in the dependency graph.