Status: Accepted — May 2026
Scope: All Python source under django-backend/
The repository has Python code in django-backend/ and .vscode/settings.json
already enables editor.formatOnSave. The recommended editor extensions
include both ms-python.black-formatter and charliermarsh.ruff. Both tools
default to double-quoted strings when they reformat Python code.
However, no project-level formatter config exists yet (no pyproject.toml,
no ruff.toml). That means style is currently "whatever each contributor's
editor does on save," which produces unpredictable diffs:
- Django's
startprojecttemplate generates single-quoted strings. - A contributor with formatOnSave enabled saves the file → all quotes flip to double.
- The next PR contains the genuine change PLUS dozens of unrelated quote flips, drowning the review in noise.
All new and existing Python code in django-backend/ uses double-quoted
strings. As part of T3 (env-driven settings), the existing config/settings.py
was mechanically converted from single to double quotes so the convention is
consistent from this point forward.
This matches the default behavior of Black, ruff format, and PEP 8's "prefer double quotes when not closing a docstring" guidance.
- Contributors should let their editor reformat on save (it will produce double quotes by default — no extra config needed today).
- A future task will add a project-level
ruffconfiguration inpyproject.tomlso this rule is enforced by CI rather than assumed by editor behavior. - Until that task lands, occasional drift is possible but small.
- If a contributor's editor produces single quotes (e.g., a Black variant or a misconfigured Prettier-for-Python plugin), they should normalize before opening a PR.
- T-tooling (TBD): add
ruffconfig + a CI check so this rule is enforced rather than honored by convention alone.