Standalone ticket
Effort estimate: 2
The repo's Python formatting settings (Black, isort, flake8 via setup.cfg / tox.ini / similar) are likely conflicting with IDE autoformatting for contributors. Adding an .editorconfig file (and optionally VS Code workspace settings in .vscode/settings.json) gives every editor a single source of truth that doesn't touch the CI/linting config.
This is a low-risk quality-of-life fix that prevents "noisy" diffs caused by autoformatter conflicts and establishes a clear convention for new contributors.
-
.editorconfig(new) — canonical editor-agnostic formatting rules:root = true [*] indent_style = space indent_size = 4 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.{html,css,js,json,yml,yaml,md}] indent_size = 2 [*.py] indent_size = 4 max_line_length = 88
-
.vscode/settings.json(optional — see Open Questions) — VS Code-specific overrides so Copilot/Pylance/Black extension don't fight each other:
{
"editor.formatOnSave": true,
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.tabSize": 4
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.tabSize": 2
},
"python.linting.flake8Enabled": true,
"python.linting.enabled": true
}setup.cfg— confirm[flake8]and[isort]sections are present and consistent with the above (they probably already are; this is a verification step)
-
.editorconfigcommitted to repo root -
.vscode/settings.jsoncommitted if team agrees (see Open Questions), otherwise documented inREADME.mdas a recommended local setup - A contributor cloning the repo fresh gets consistent formatting behavior without any manual configuration
- No existing CI checks break
-
setup.cfg/tox.inilint config is consistent with.editorconfigvalues (no contradictions)
- Should
.vscode/settings.jsonbe committed? Committing it makes setup automatic for VS Code users but implies VS Code as the team default, which can feel presumptuous. Alternatives: (a) skip it entirely and rely on.editorconfigalone, (b) commit it but add a note inREADME.mdthat contributors on other editors should configure equivalents manually, (c) add VS Code extension recommendations only (.vscode/extensions.json) which is lighter and more conventional. The.editorconfigalone covers all editors and is almost certainly sufficient.