Inspect Resolve Helpers
Internal resolution helpers. Use ast_inspect for the request/response interface. Missing and ambiguous symbols are errors; batch callers should check individual entries. Module source is truncated to 200 lines.
Signatures and docstrings below are rendered from the checkout during the build.
inspect_module
inspect_module(pkg, name, *, source=False)
Try to resolve name as a module name and return module metadata.
Source code in packages/axm-ast/src/axm_ast/tools/inspect_resolve.py
resolve_module_symbol
resolve_module_symbol(pkg, dotted, *, source=False)
Try to resolve dotted as module_name.symbol_name.
Tries longest module prefix first (e.g. core.checker before core).
Returns None if no module prefix matches.
Source code in packages/axm-ast/src/axm_ast/tools/inspect_resolve.py
InspectTool.execute
execute(*, path='.', symbol=None, symbols=None, source=False, **kwargs)
Inspect a symbol by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to package directory. |
'.'
|
symbol
|
str | None
|
Symbol name to inspect (required if symbols is not provided).
Supports dotted paths like |
None
|
symbols
|
list[str] | None
|
Optional list of symbol names for batch inspection. |
None
|
source
|
bool
|
If True, include source code in the response. |
False
|
Returns:
| Type | Description |
|---|---|
ToolResult
|
ToolResult with symbol details. |
Source code in packages/axm-ast/src/axm_ast/tools/inspect.py
_inspect_symbol
_inspect_symbol(project_path, symbol, *, source=False)
Resolve a simple or dotted symbol name to inspect details.
For a simple name, the exact-name match is preferred: search_symbols
matches on substring, so a request for Foo would otherwise also pick
a superset like FooBar. The exact match wins; when several symbols
share the requested name across modules, a disambiguation error is
returned; when none match exactly, resolution falls through to the
module fallback (never a substring superset).
Source code in packages/axm-ast/src/axm_ast/tools/inspect.py
resolve_class_method
resolve_class_method(pkg, dotted, *, source=False)
Try to resolve dotted as ClassName.method_name.
Returns None if no class matches.
Source code in packages/axm-ast/src/axm_ast/tools/inspect_resolve.py
InspectTool._inspect_batch
_inspect_batch(project_path, symbols, *, source)
Inspect multiple symbols in batch.