validate_actions.globals.fixer¶
Fixer module for applying changes to YAML workflow files.
Classes
|
Default fixer that batches edits and applies them on flush. |
|
Abstract base for applying fixes to YAML workflow files. |
|
A fixer that does nothing. |
- class validate_actions.globals.fixer.Fixer[source]¶
Bases:
ABCAbstract base for applying fixes to YAML workflow files.
- abstractmethod edit_yaml_at_position(idx, old_text, new_text, problem, new_problem_desc)[source]¶
Queue an edit to replace text at a specific character position.
- Parameters:
idx (int) – Character index where replacement starts
old_text (str) – Text to be replaced (for validation)
new_text (str) – Replacement text
problem (Problem) – Problem instance to update
new_problem_desc (str) – New description for the fixed problem
- Returns:
Updated problem instance
- Return type:
- class validate_actions.globals.fixer.BaseFixer(file_path)[source]¶
Bases:
FixerDefault fixer that batches edits and applies them on flush.
- Parameters:
file_path (Path)
- edit_yaml_at_position(idx, old_text, new_text, problem, new_problem_desc)[source]¶
Queue an edit for later application and mark problem as fixed.
- Parameters:
idx (int) – Character index where replacement starts
old_text (str) – Text to be replaced (for validation)
new_text (str) – Replacement text
problem (Problem) – Problem instance to update
new_problem_desc (str) – New description for the fixed problem
- Returns:
Updated problem instance with NON level
- Return type: