dpmcore.services.script_fixups

Known EBA source-data errors ported from mdpm’s mdm-fix-json-values.py. These are not generation bugs: dpmcore and mdpm both reproduce them faithfully because the underlying OperationNode/OperandReference data in the DPM database itself is wrong for a fixed set of ~30 validations. EBA doesn’t amend already-published releases, so the values stay wrong indefinitely — this module patches an already-generated script’s ast in place, a stopgap rather than a source-side fix.

Exposed through the dpmcore fix-script CLI command (see CLI Reference), which is expected to run after every export-script/generate-script generation, not just once.

fix_operation_ast

dpmcore.services.script_fixups.fix_operation_ast(op_code, ast)[source]

Apply every known fix for op_code to ast in place.

Returns whether anything changed, so a caller can skip rewriting an operation (or a whole file) untouched.

Return type:

bool

Parameters:

fix_module_operations

dpmcore.services.script_fixups.fix_module_operations(operations)[source]

Apply fix_operation_ast() to every operation with a known fix.

Returns the codes actually changed.

Return type:

List[str]

Parameters:

operations (Dict[str, Dict[str, Any]])