Skip to main content

Module ruff_parser

Module ruff_parser 

Source
Expand description

Python parser and CST manipulation using Ruff’s parser.

This module provides a Rust implementation that preserves formatting and integrates with mypy for type inference.

Structs§

FunctionCallReplacer
Visitor to find and replace function calls
PythonModule
Parse Python source code preserving all formatting information

Functions§

apply_replacements
Apply replacements to source code preserving formatting
collect_deprecated_functions
Collect deprecated functions using Ruff’s AST For now, we delegate to LibCST collector until we implement full extraction
migrate_file_with_improved_ruff
Compatibility function for import tracking tests This provides the same interface as the old ruff_parser_improved module
migrate_file_with_ruff
Main entry point for migrating a file using Ruff parser