Provide Python code formatting once Monaco Format document piping exists for the playground — browser-friendly constraint (Pyodide) vs server-backed formatter.
Options to evaluate — pick implementation time
A. Run Black (or autopep8) inside Pyodide worker if WASM port available and deps acceptable. B.Backend / code-execution microservice: format user snippet with black (or Ruff --format), return text — aligns with graded runs already leaving the sandbox. C. Lighter PEP8-only heuristic (last resort — not parity with “Black”).
Integration
Implement provideDocumentFormattingEditProvider('python', …) (or our Monaco language id).
Latency UX: spinner / cancel for slow WASM cold start.
Teaching: deterministic output for novices preferred.
Dependency
Platform Format toolbar + Monaco #24 + parent platform ticket.
## Summary
Provide **Python** code formatting once Monaco **Format document** piping exists for the playground — **browser-friendly** constraint (Pyodide) vs **server-backed** formatter.
## Options to evaluate — pick implementation time
**A.** Run **Black** (or **`autopep8`**) inside **Pyodide** worker if WASM port available and deps acceptable.
**B.** **Backend / code-execution microservice**: format user snippet with **`black`** (or Ruff `--format`), return text — aligns with graded runs already leaving the sandbox.
**C.** Lighter PEP8-only heuristic (last resort — not parity with “Black”).
## Integration
- Implement `provideDocumentFormattingEditProvider('python', …)` (or our Monaco language id).
- **Latency UX**: spinner / cancel for slow WASM cold start.
- **Teaching**: deterministic output for novices preferred.
## Dependency
Platform Format toolbar + Monaco `#24` + parent platform ticket.
Verified 2026-08-07 against spikersoft-angular@8e5a4048 and spikersoft-backend@98102023: no Python formatter provider in the Pyodide runner and no formatting endpoint on the backend; only JS/Prettier exists.
Status: not started — blocked on the shared Format toolbar (#35), which is also still open.
Closing here. Work now lives in the repo that holds the fix, so fixes #<N> in a PR will
auto-close it on merge. The umbrella tracker keeps cross-repo epics only.
— Opus 5 Agent
Migrated to **spikerj/spikersoft-angular#667** as part of the umbrella-tracker breakup.
Verified 2026-08-07 against `spikersoft-angular@8e5a4048` and `spikersoft-backend@98102023`: no Python formatter provider in the Pyodide runner and no formatting endpoint on the backend; only JS/Prettier exists.
Status: not started — blocked on the shared Format toolbar (#35), which is also still open.
Closing here. Work now lives in the repo that holds the fix, so `fixes #<N>` in a PR will
auto-close it on merge. The umbrella tracker keeps cross-repo epics only.
— Opus 5 Agent
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Provide Python code formatting once Monaco Format document piping exists for the playground — browser-friendly constraint (Pyodide) vs server-backed formatter.
Options to evaluate — pick implementation time
A. Run Black (or
autopep8) inside Pyodide worker if WASM port available and deps acceptable.B. Backend / code-execution microservice: format user snippet with
black(or Ruff--format), return text — aligns with graded runs already leaving the sandbox.C. Lighter PEP8-only heuristic (last resort — not parity with “Black”).
Integration
provideDocumentFormattingEditProvider('python', …)(or our Monaco language id).Dependency
Platform Format toolbar + Monaco
#24+ parent platform ticket.Migrated to spikerj/spikersoft-angular#667 as part of the umbrella-tracker breakup.
Verified 2026-08-07 against
spikersoft-angular@8e5a4048andspikersoft-backend@98102023: no Python formatter provider in the Pyodide runner and no formatting endpoint on the backend; only JS/Prettier exists.Status: not started — blocked on the shared Format toolbar (#35), which is also still open.
Closing here. Work now lives in the repo that holds the fix, so
fixes #<N>in a PR willauto-close it on merge. The umbrella tracker keeps cross-repo epics only.
— Opus 5 Agent