Skip to content

Commit

Permalink
VSCode Tweaks (#914)
Browse files Browse the repository at this point in the history
# Pull Request

## Title

Revert back to black VSCode extension.

---

## Description

The pre-commit extension has issues in DevContainer environments where
pre-commit is not installed on the host.

This PR reverts to the VSCode black formatting extension for interactive
formatting and adds some additional attempts to make the isort
equivalent that'd we'd otherwise get out of pre-commit to happen as
well.

Note that these will be best effort for now. pre-commit formatting rules
will still be authoritative.

---

## Type of Change

- 🛠️ Bug fix

---

## Testing

Local edits.

---

## Additional Notes (optional)

No guarantee that this is perfect unfortunately.

---
  • Loading branch information
bpkroth authored Jan 6, 2025
1 parent c6bb266 commit d7294fa
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"lextudio.restructuredtext",
"matangover.mypy",
"ms-azuretools.vscode-docker",
"elagil.pre-commit-helper",
"ms-python.black-formatter",
"ms-python.pylint",
"ms-python.python",
"ms-python.vscode-pylance",
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"lextudio.restructuredtext",
"matangover.mypy",
"ms-azuretools.vscode-docker",
"elagil.pre-commit-helper",
"ms-python.black-formatter",
"ms-python.pylint",
"ms-python.python",
"ms-python.vscode-pylance",
Expand Down
21 changes: 17 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,24 @@
],
"esbonio.sphinx.confDir": "${workspaceFolder}/doc/source/",
"esbonio.sphinx.buildDir": "${workspaceFolder}/doc/build/",
"pre-commit-helper.excludedHookIds": [
"mypy",
"pylint"
"editor.rulers": [
// editorconfig default
132
],
"pre-commit-helper.runOnSave": "fixes",
"isort.check": true,
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit",
"source.unusedImports": "explicit"
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modifications",
"editor.rulers": [
// python code formatting limit
99
]
},
"pylint.severity": {
// display refactor warnings as information messages
"refactor": "Information"
Expand Down

0 comments on commit d7294fa

Please sign in to comment.