From ade999807d232795075fc1cea421492498ad09d4 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Wed, 21 Jan 2026 14:12:25 +0000 Subject: [PATCH] add black formatting on-save, to edited file only, to devcontainer --- .devcontainer/devcontainer.json | 16 +++++++++++----- .devcontainer/requirements.txt | 4 +++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 761786cd..5e23ae0d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -11,9 +11,6 @@ ], "customizations": { "vscode": { - "settings": { - "files.defaultWorkspace": "/workspaces/model" - }, "extensions": [ "ms-python.python", "ms-toolsai.jupyter", @@ -24,8 +21,17 @@ "fabiospampinato.vscode-todo-plus", "jgclark.vscode-todo-highlight", "corentinartaud.pdfpreview", - "ms-python.vscode-python-envs" - ] + "ms-python.vscode-python-envs", + "ms-python.black-formatter" + ], + "settings": { + "files.defaultWorkspace": "/workspaces/model", + "[python]": { + "editor.defaultFormatter": "ms-python.black-formatter", + "editor.formatOnSave": true + }, + "python.formatting.provider": "none" + } } }, "containerEnv": { diff --git a/.devcontainer/requirements.txt b/.devcontainer/requirements.txt index 300b86b0..5e7753a6 100644 --- a/.devcontainer/requirements.txt +++ b/.devcontainer/requirements.txt @@ -17,4 +17,6 @@ sqlmodel # Testing pytest==9.0.2 pytest-cov==7.0.0 -ipykernel>=6.25,<7 \ No newline at end of file +ipykernel>=6.25,<7 +# Formatting +black==26.1.0 \ No newline at end of file