blark.format.get_reformatted_code_blocks
- blark.format.get_reformatted_code_blocks(results: List[ParseResult], user: Any | None = None, filename: Path | None = None, raise_on_error: bool = True) List[OutputBlock] [source]
For each parsed code block, generate an OutputBlock for writing to disk.
- Parameters:
- resultsList[ParseResult]
The parsed source code.
- userAny, optional
The loader used for parsing the above (may be a blark.plain.PlainFileLoader or a blark.solution.TcPOU, for example)
- filenamepathlib.Path, optional
The filename associated with the source code parts.
- raise_on_errorbool
In the event of a reformatting error, raise immediately. If False, the original (not reformatted) source code will be used as-is.
- Returns:
- List[OutputBlock]
[TODO:description]