ml_switcheroo.core.rewriter.interface ===================================== .. py:module:: ml_switcheroo.core.rewriter.interface .. autoapi-nested-parse:: Interface definition for Rewriter Passes. This module defines the abstract base class that all transformation passes must implement to be compatible with the ``RewriterPipeline``. Classes ------- .. autoapisummary:: ml_switcheroo.core.rewriter.interface.RewriterPass Module Contents --------------- .. py:class:: RewriterPass Bases: :py:obj:`abc.ABC` Abstract contract for a transformation pass in the rewriting pipeline. Passes encapsulate discrete transformation logic (e.g. Structural Rewriting, API Remapping) and are executed sequentially by the pipeline. .. py:method:: transform(module: libcst.Module, context: ml_switcheroo.core.rewriter.context.RewriterContext) -> libcst.Module :abstractmethod: Executes the transformation logic on the given CST module. :param module: The input LibCST module. :param context: The shared rewriter context containing configuration and state. :returns: The transformed LibCST module.