Functions
FUNC find_fixable_calls
source: Python source code to analyze.filepath: Path used for error messages and AST filename metadata.
- List of
FixLocationobjects describing each call site that should be fixed.
FUNC fix_file
filepath: Path to the Python file to fix.mode: Fix strategy to apply.dry_run: IfTrue, return locations without modifying the file.
- List of
FixLocationobjects for each call site found (and optionally fixed).
FUNC fix_path
path: File or directory to process. Directories are scanned recursively for*.pyfiles.mode: Fix strategy to apply.dry_run: IfTrue, report locations without modifying files.
- Aggregated
FixResultwith all fix locations and summary counts.
Classes
CLASS FixLocation
Location of a single fix along with source position and call metadata.
Args:
filepath: Path to the source file containing the call.line: One-based line number of the call expression.col_offset: Column offset of the call expression.function_name: Mellea function that was called (“aact”, “ainstruct”, or “aquery”).call_style: Whether the call is “functional” or “session”.target_variable: MOT variable name from the assignment, if any.context_variable: Name of the context variable, if any.
CLASS FixResult
Aggregated summary of all fixes applied across the scanned codebase.
Args:
locations: Individual fix locations with call metadata.total_fixes: Total number of fixes applied.files_affected: Number of distinct files that were modified.