Skip to content

Commit 54fe6a6

Browse files
committed
Add dev container
1 parent 95a3c49 commit 54fe6a6

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/python
3+
{
4+
"name": "Python 3",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/devcontainers/python:0-3.9",
7+
"features": {
8+
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
9+
"plugins": "ssh-agent",
10+
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions"
11+
}
12+
},
13+
14+
// Features to add to the dev container. More info: https://containers.dev/features.
15+
// "features": {},
16+
17+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
18+
// "forwardPorts": [],
19+
20+
// Use 'postCreateCommand' to run commands after the container is created.
21+
// "postCreateCommand": "pip3 install -Ur requirements-dev.txt",
22+
"postStartCommand": "pip3 install -Ur requirements-dev.txt",
23+
// Configure tool-specific properties.
24+
// "customizations": {},
25+
26+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
27+
"remoteUser": "root"
28+
}

.pre-commit-config.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ repos:
2222
- id: check-docstring-first
2323
- id: check-executables-have-shebangs
2424
- id: check-json
25+
exclude: '.devcontainer/.*'
2526
- id: pretty-format-json
27+
exclude: '.devcontainer/.*'
2628
args:
2729
- --indent
2830
- '4'
@@ -33,11 +35,11 @@ repos:
3335
args:
3436
- --remove
3537
- repo: https://github.com/psf/black
36-
rev: 2ddea293a88919650266472186620a98a4a8bb37 # frozen: 22.12.0
38+
rev: b0d1fba7ac3be53c71fb0d3211d911e629f8aecb # frozen: 23.1.0
3739
hooks:
3840
- id: black
3941
- repo: https://github.com/pycqa/isort
40-
rev: 4e97b170469b7c8ef29afe944ebfb057791457aa # frozen: 5.11.4
42+
rev: dbf82f2dd09ae41d9355bcd7ab69187a19e6bf2f # frozen: 5.12.0
4143
hooks:
4244
- id: isort
4345
- repo: https://github.com/pre-commit/pygrep-hooks

0 commit comments

Comments
 (0)