|
10 | 10 | "customizations": { |
11 | 11 | "vscode": { |
12 | 12 | "settings": { |
13 | | - "austin.mode": "Wall time", |
| 13 | + "[python]": { |
| 14 | + "editor.defaultFormatter": "ms-python.black-formatter", |
| 15 | + "editor.formatOnSave": true, |
| 16 | + "editor.codeActionsOnSave": { |
| 17 | + "source.organizeImports": "always", |
| 18 | + "source.fixAll": "always" |
| 19 | + } |
| 20 | + }, |
14 | 21 | "black-formatter.args": ["--line-length", "120"], |
| 22 | + "black-formatter.importStrategy": "fromEnvironment", |
| 23 | + "isort.args": ["--profile", "black"], |
| 24 | + "isort.importStrategy": "fromEnvironment", |
| 25 | + "austin.mode": "Wall time", |
15 | 26 | "editor.defaultFormatter": "esbenp.prettier-vscode", |
16 | 27 | "editor.formatOnSave": true, |
17 | | - "esbonio.server.enabled": true, |
18 | | - "esbonio.sphinx.confDir": "${workspaceFolder}/docs/source", |
19 | 28 | "jupyter.widgetScriptSources": ["jsdelivr.com", "unpkg.com"], |
20 | | - "prettier.prettierPath": "/usr/local/prettier", |
21 | | - "python.defaultInterpreterPath": "/usr/local/bin/python", |
22 | | - "python.formatting.autopep8Path": "/usr/local/py-utils/bin/autopep8", |
23 | | - "python.formatting.blackPath": "/usr/local/py-utils/bin/black", |
24 | | - "python.formatting.provider": "black", |
25 | | - "python.formatting.yapfPath": "/usr/local/py-utils/bin/yapf", |
26 | | - "python.languageServer": "Pylance", |
27 | | - "python.linting.banditPath": "/usr/local/py-utils/bin/bandit", |
28 | | - "python.linting.enabled": true, |
29 | | - "python.linting.flake8Path": "/usr/local/py-utils/bin/flake8", |
30 | | - "python.linting.mypyPath": "/usr/local/py-utils/bin/mypy", |
31 | | - "python.linting.pycodestylePath": "/usr/local/py-utils/bin/pycodestyle", |
32 | | - "python.linting.pydocstylePath": "/usr/local/py-utils/bin/pydocstyle", |
33 | | - // Disabling specific messages: |
| 29 | + // Line length to match black settings |
| 30 | + // Disable specific messages: |
34 | 31 | // - To find the details do: /usr/local/py-utils/bin/pylint --list-msgs |
35 | 32 | // - Disable missing-module-docstring (C0114) because we don't document modules routinely, just their members |
36 | 33 | // - Disable invalid-name (C0103) because pylint thinks that eg 'x', 'df', 'np' are invalid due to their lengths |
37 | | - "python.linting.pylintArgs": [ |
| 34 | + "pylint.args": [ |
38 | 35 | "--max-line-length=120", |
39 | | - "--disable=missing-module-docstring,invalid-name" |
40 | | - ], |
41 | | - "python.linting.pylintEnabled": true, |
42 | | - "python.linting.pylintPath": "/usr/local/py-utils/bin/pylint", |
43 | | - "python.pythonPath": "/usr/local/bin/python", |
44 | | - "python.testing.pytestArgs": [ |
45 | | - "--cov=django_svelte_jsoneditor", |
46 | | - "--cov-report=xml:cov.xml" |
| 36 | + "--disable=missing-module-docstring,invalid-name", |
| 37 | + "--load-plugins=pylint_django" |
47 | 38 | ], |
48 | | - // Scrolling the editor is a nice idea but it doesn't work, always out of sync and impossible to manage |
49 | | - "restructuredtext.preview.scrollEditorWithPreview": false, |
50 | | - "restructuredtext.preview.scrollPreviewWithEditor": false, |
51 | | - "restructuredtext.linter.doc8.extraArgs": ["--max-line-length 180"], |
52 | | - "terminal.integrated.defaultProfile.linux": "zsh" |
| 39 | + "python.testing.pytestEnabled": true, |
| 40 | + "python.testing.unittestEnabled": false, |
| 41 | + "terminal.integrated.defaultProfile.linux": "zsh", |
| 42 | + // Handle this: https://github.com/microsoft/vscode-python/issues/693 |
| 43 | + "python.testing.pytestArgs": ["--no-cov"] |
53 | 44 | }, |
54 | | - |
55 | 45 | // Add the IDs of extensions you want installed when the container is created. |
56 | 46 | "extensions": [ |
57 | | - |
| 47 | + "erikphansen.vscode-toggle-column-selection", |
| 48 | + "esbenp.prettier-vscode", |
| 49 | + "GitHub.copilot", |
| 50 | + "GitHub.copilot-chat", |
| 51 | + "github.vscode-github-actions", |
58 | 52 | "irongeek.vscode-env", |
59 | | - "me-dutour-mathieu.vscode-github-actions", |
60 | | - "mikestead.dotenv", |
61 | 53 | "ms-python.python", |
62 | 54 | "ms-python.vscode-pylance", |
63 | 55 | "ms-python.pylint", |
| 56 | + "ms-python.black-formatter", |
| 57 | + "ms-python.flake8", |
| 58 | + "ms-python.isort", |
64 | 59 | "ms-toolsai.jupyter", |
65 | 60 | "ms-toolsai.jupyter-renderers", |
66 | 61 | "ms-toolsai.jupyter-keymap", |
|
70 | 65 | "shamanu4.django-intellisense", |
71 | 66 | "thebarkman.vscode-djaneiro", |
72 | 67 | "trond-snekvik.simple-rst", |
73 | | - "ms-azuretools.vscode-docker", |
74 | | - "ryanluker.vscode-coverage-gutters", |
75 | | - "ms-python.black-formatter", |
76 | | - "GitHub.copilot" |
| 68 | + "4ops.terraform" |
77 | 69 | ] |
78 | 70 | } |
79 | 71 | }, |
80 | 72 |
|
81 | 73 | // Use 'forwardPorts' to make a list of ports inside the container available locally. |
82 | 74 | "forwardPorts": [80, 443, 5500, 8000], |
83 | 75 |
|
84 | | - // Use 'postCreateCommand' to run commands after the container is created. |
85 | | - // Note: Reverting to use pip requirements until we can install private dependencies in GHA with poetry |
86 | | - "postCreateCommand": ". .devcontainer/postcreate.sh", |
| 76 | + // Use 'postAttachCommand' to run commands after the container is created and attached (ie git is available). |
| 77 | + // This is preferential to postCreateCommand as invoking git (eg for private poetry installs or addition of |
| 78 | + // git config preferences) doesn't override injected git configs |
| 79 | + // https://stackoverflow.com/a/73097009/3556110 |
| 80 | + "postAttachCommand": ". .devcontainer/postattach.sh", |
87 | 81 |
|
88 | 82 | // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
89 | 83 | "remoteUser": "vscode", |
|
0 commit comments