ml_switcheroo.core.import_fixer.resolution¶
Import Resolution Logic.
This module centralizes the decision-making process for imports. It allows the current codebase to be analyzed before transformation commits to determine imports.
Classes¶
Represents a normalized import requirement. |
|
The strategy for the ImportFixer to execute. |
|
Module Contents¶
- class ml_switcheroo.core.import_fixer.resolution.ImportReq[source]¶
Represents a normalized import requirement. Can represent import module as alias or from module import sub as alias.
- module: str¶
- subcomponent: str | None = None¶
- alias: str | None = None¶
- property signature: str¶
Unique signature for deduplication.
- class ml_switcheroo.core.import_fixer.resolution.ResolutionPlan[source]¶
The strategy for the ImportFixer to execute.
- path_to_alias: Dict[str, str]¶
- class ml_switcheroo.core.import_fixer.resolution.ImportResolver(semantics: ml_switcheroo.semantics.manager.SemanticsManager)[source]¶
- semantics¶
- resolve(tree: libcst.Module, target_fw: str) ResolutionPlan[source]¶