helpers
_helpers
Shared AST helpers for rule implementations.
ASTCache
Thread-safe AST parse cache.
Parses each file at most once per audit session. Uses double-checked locking so multiple threads hitting the same file don't duplicate work.
Source code in packages/axm-audit/src/axm_audit/core/rules/_helpers.py
get_or_parse(path)
Return cached AST or parse path and cache the result.
Source code in packages/axm-audit/src/axm_audit/core/rules/_helpers.py
get_ast_cache()
get_python_files(directory)
Get all Python files in a directory recursively.
parse_file_safe(path)
Parse a Python file, returning None on error.