Python Package

PEP 8 Style

Applying PEP 8 formatting and style rules with ManifestGuard quality checks.

Early Access: Until 2026-12-31

For mgpy, PEP 8 is the readable baseline. Good style rules speed up debugging, reduce cognitive load and keep review discussions short.

Key points

  • CLI: On Windows the examples use the recommended py -3.12 -m <module> ... form (for example py -3.12 -m manifestguard ...). On Linux/macOS this usually maps to python3.12 -m ....
  • Use automatic formatting consistently instead of manual touch-up work.
  • Keep import grouping, line lengths and naming stable across the whole repository.
  • Treat style rules as a prerequisite for high-value extended checks, not as aftercare.

Recommended mgpy workflow

  1. Lock Ruff rules in the project and let local runs fix what can be fixed automatically.
  2. Before larger refactors, remove style drift so logic changes stay reviewable in isolation.
  3. Run mgpy after formatting so only real quality signals remain for triage.

Quick start

py -3.12 -m ruff check . --fix
py -3.12 -m ruff format .
py -3.12 -m manifestguard check