Skip to content

Instantly share code, notes, and snippets.

@JanCBrammer
Last active February 16, 2024 10:31
Show Gist options
  • Save JanCBrammer/d076c09b6d1d8479aa963f7e0fe34167 to your computer and use it in GitHub Desktop.
Save JanCBrammer/d076c09b6d1d8479aa963f7e0fe34167 to your computer and use it in GitHub Desktop.
Python VSCode devcontainer
// https://containers.dev/implementors/json_reference/
// https://hub.docker.com/_/microsoft-vscode-devcontainers
{
"name": "",
"image": "mcr.microsoft.com/devcontainers/python:3.12",
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.black-formatter",
"ms-python.mypy-type-checker",
"ms-python.flake8",
"KevinRose.vsc-python-indent",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"eamodio.gitlens",
"GitHub.copilot"
],
"settings": {
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"editor.formatOnSave": true,
"python.editor.defaultFormatter": "ms-python.black-formatter",
"black-formatter.args": [
"--config",
"pyproject.toml"
],
"mypy-type-checker.args": [
"--config",
"pyproject.toml"
]
},
}
},
"postCreateCommand": "pip install --upgrade pip && pip install -e .[dev]"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment