pyfcstm.diagnostics.suggested_fix

Helpers for rendering structured diagnostic suggested fixes.

render_suggested_fix

pyfcstm.diagnostics.suggested_fix.render_suggested_fix(code: str, refs: Mapping[str, Any]) Dict[str, Any] | None[source]

Render the codes.yaml suggested-fix template for one emit.

Parameters:
  • code (str) – Diagnostic code.

  • refs (Mapping[str, Any]) – Already-rendered diagnostic refs payload.

Returns:

JSON-friendly suggested-fix payload, or None if the code has no suggested-fix metadata.

Return type:

Optional[Dict[str, Any]]

refs_with_suggested_fix

pyfcstm.diagnostics.suggested_fix.refs_with_suggested_fix(code: str, refs: Mapping[str, Any]) Dict[str, Any][source]

Return refs copied with suggested_fix attached when declared.