Deps
deps
Source-module dependency gathering (imports + module-level constants).
gather_source_constants(tree)
Map module-level constant names to their SimpleStatementLine.
Source code in packages/axm-anvil/src/axm_anvil/core/deps.py
gather_source_helpers(tree)
Map top-level FunctionDef / ClassDef names to their node.
Source code in packages/axm-anvil/src/axm_anvil/core/deps.py
gather_source_imports(tree)
Map local names to the ImportInfo describing their origin.
Imports nested in a top-level try/except or if guard are
flagged conditional=True with a handle on the guarding block.
Source code in packages/axm-anvil/src/axm_anvil/core/deps.py
topo_sort_constants(constants)
Topologically sort constants so deps appear before dependents.
Cycles are tolerated — back-edges are skipped and all members are
still emitted (Python would raise NameError at runtime for a
genuine cycle, so arbitrary order among cycle members is acceptable).