Skip to main content

Module actions

Module actions 

Source
Expand description

Semantic actions: query and mutation primitives for refactoring recipes.

Query actions return data without side effects. Mutation actions produce PlannedEdits without touching the filesystem.

Enums§

InsertPosition
Where to insert code relative to a symbol.

Functions§

check_conflicts
Check for naming conflicts that a rename would introduce.
decoration_extended_start
Walk backward from the symbol’s node through preceding named siblings, collecting decoration nodes (doc comments, attributes, decorators, etc.). Returns (byte_offset, warning) where:
find_references
Find all cross-file references to a symbol (callers + importers).
locate_symbol
Find a symbol’s location in a file.
plan_delete_symbol
Plan deletion of a symbol from a file.
plan_insert
Plan insertion of code relative to a symbol.
plan_rename_in_file
Plan renames of an identifier across specific lines in a file.
plan_replace_symbol
Plan replacement of a symbol’s content.