pre¶

Pre-processing Phase for Call Rewriting.

Handles functional unwrapping, plugin claims, and lifecycle method stripping. Updated to remove dependencies on deleted legacy modules.

Functions¶

handle_pre_checks(→ Tuple[bool, libcst.CSTNode])

Executes pre-lookup checks and transformations.

resolve_implicit_method(→ Optional[str])

Attempts to resolve method calls on objects to full API paths.

Module Contents¶

pre.handle_pre_checks(rewriter: Any, original: libcst.Call, updated: libcst.Call, func_name: str | None) → Tuple[bool, libcst.CSTNode]¶

Executes pre-lookup checks and transformations.

Parameters:
  • rewriter – The calling transformer (duck typing: needs _get_source_traits, _report_warning, _is_stateful, semantics, target_fw, ctx).

  • original – The original CST node.

  • updated – The updated CST node.

  • func_name – Resolved function name.

Returns:

Tuple(handled, result_node).

pre.resolve_implicit_method(rewriter: Any, original: libcst.Call, func_name: str | None) → str | None¶

Attempts to resolve method calls on objects to full API paths.