oct.formatter package#

Formatter module for OCT.

Purpose#

Provides auto-fixing capabilities for Option C compliance violations.

Responsibilities#

  • Export the main formatter entry point (run_formatter).

  • Enable CLI integration of the formatter command.

Diagnostics#

Domain: OCT.FORMATTER Levels:

L2 — formatter lifecycle and command execution L3 — file processing and fix application L4 — detailed fixer operation (header, docstring, import, func pattern)

Contracts#

  • All public exports are guaranteed to be importable from this module.

oct.formatter.run_formatter(project_root: Path, argv: List[str] | None = None) None[source]#

Run the Option C formatter on the given project root.

Parameters:
  • project_root (Path) – The detected Option C project root directory.

  • argv (list[str] | None) – Optional list of command-line arguments. If None, argparse will use sys.argv[1:].

Submodules#