From 33b95e27defaf1a953aed049a6f7a45c0540cf32 Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 13 May 2024 19:36:34 +0200 Subject: [PATCH] Update documentation to reflect ruff --- .devcontainer/devcontainer.json | 11 +++++++++-- CONTRIBUTING.md | 6 +++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b3079198c..a480ae1eb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,15 +18,22 @@ "editor.insertSpaces": true, "files.trimTrailingWhitespace": true, "[markdown]": { - "files.trimTrailingWhitespace": false, + "files.trimTrailingWhitespace": false }, "python.pythonPath": "/usr/local/bin/python", + "[python]": { + "editor.codeActionsOnSave": { + "source.organizeImports": "explicit" + }, + "editor.formatOnSave": true, + "editor.defaultFormatter": "charliermarsh.ruff" + } }, // Add the IDs of extensions you want installed when the container is created. "extensions": [ "ms-python.python", "ms-python.vscode-pylance", - "ms-python.isort", + "charliermarsh.ruff", "davidanson.vscode-markdownlint", "ms-azuretools.vscode-docker", "vscode-icons-team.vscode-icons", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f9ab29592..66ba4f830 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,12 +72,12 @@ you can manually run pre-commit with `pre-commit run -a`. mypy freqtrade ``` -### 4. Ensure all imports are correct +### 4. Ensure formatting is correct -#### Run isort +#### Run ruff ``` bash -isort . +ruff format . ``` ## (Core)-Committer Guide