Dead code
dead_code
DeadCodeTool — detect unreferenced symbols in a package.
DeadCodeTool
Bases: AXMTool
Detect dead (unreferenced) code symbols in a Python package.
Registered as ast_dead_code via axm.tools entry point.
Source code in packages/axm-ast/src/axm_ast/tools/dead_code.py
name
property
Return tool name for registry lookup.
execute(*, path='.', include_tests=False, **kwargs)
Find dead code in a Python package.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str
|
Path to package directory. |
'.'
|
include_tests
|
bool
|
Include test fixtures in scan (default False). |
False
|
Returns:
| Type | Description |
|---|---|
ToolResult
|
ToolResult with dead symbols list. |