Skip to content

Commit 2dfc726

Browse files
authored
chore: add VS Code and devcontainer configurations (#429)
1 parent 4070ae1 commit 2dfc726

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
/* We use python:3 because it's based on Debian, which has libxcb-errors0 available. The default universal image is
3+
* based on Ubuntu, which doesn't. */
4+
"image": "mcr.microsoft.com/devcontainers/python:3",
5+
"features": {
6+
"ghcr.io/devcontainers-extra/features/apt-get-packages:1": {
7+
"packages": [
8+
/* Needed for MSS generally */
9+
"libxfixes3",
10+
/* Needed for testing */
11+
"xvfb", "xauth",
12+
/* Improves error messages */
13+
"libxcb-errors0",
14+
/* We include the gdb stuff to troubleshoot when ctypes stuff goes off the rails. */
15+
"debuginfod", "gdb",
16+
/* GitHub checks out the repo with git-lfs configured. */
17+
"git-lfs"
18+
],
19+
"preserve_apt_list": true
20+
}
21+
},
22+
"postCreateCommand": "echo set debuginfod enabled on | sudo tee /etc/gdb/gdbinit.d/debuginfod.gdb"
23+
}

.vscode/extensions.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
3+
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
4+
// List of extensions which should be recommended for users of this workspace.
5+
"recommendations": [
6+
"charliermarsh.ruff",
7+
"ms-python.mypy-type-checker",
8+
"ms-python.python",
9+
"ms-python.vscode-pylance",
10+
"ms-python.vscode-python-envs",
11+
],
12+
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
13+
"unwantedRecommendations": []
14+
}

.vscode/settings.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2+
"python.analysis.typeCheckingMode": "off", // We'll use Mypy instead of the built-in Pyright
3+
"python.testing.pytestEnabled": true,
4+
"python.testing.unittestEnabled": false,
5+
"ruff.enable": true,
6+
27
"languageToolLinter.languageTool.ignoredWordsInWorkspace": [
38
"bgra",
49
"ctypes",
@@ -19,5 +24,5 @@
1924
"xrandr",
2025
"xserver",
2126
"zlib"
22-
]
23-
}
27+
],
28+
}

0 commit comments

Comments
 (0)