Skip to content

Commit 1b2b7a8

Browse files
committed
build: add devcontainer for development environment
1 parent 34d2d24 commit 1b2b7a8

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"name": "Python 3",
3+
"image": "mcr.microsoft.com/devcontainers/python:3",
4+
"postCreateCommand": "pip3 install -r requirements-test.txt",
5+
"customizations": { // Customization for VSCode-specific settings and extensions.
6+
"vscode": {
7+
"extensions": [
8+
"charliermarsh.ruff", // Linter/formatter for Python.
9+
"ms-python.pylint", // Pylint for Python linting.
10+
"ms-python.vscode-pylance", // Pylance for Python language support and intellisense.
11+
"visualstudioexptteam.vscodeintellicode", // IntelliCode for AI-assisted code suggestions.
12+
"redhat.vscode-yaml", // YAML file support.
13+
"esbenp.prettier-vscode", // Prettier for code formatting.
14+
"GitHub.vscode-pull-request-github", // GitHub Pull Request extension.
15+
"njpwerner.autodocstring", // Extension for automatically generating Python docstrings.
16+
"usernamehw.errorlens" // Highlights errors and warnings inline within the editor.
17+
],
18+
"settings": {
19+
"pylint.importStrategy": "fromEnvironment", // Uses the Pylint available in the environment.
20+
"editor.formatOnPaste": false, // Disable auto-formatting on paste.
21+
"editor.formatOnSave": true, // Enable auto-formatting on save.
22+
"editor.formatOnType": true, // Enable auto-formatting while typing.
23+
"files.trimTrailingWhitespace": true, // Automatically remove trailing whitespace when saving files.
24+
"yaml.customTags": [ // YAML-specific tags, useful for Home Assistant configuration files.
25+
"!input scalar", // YAML tag used to define input variables in Home Assistant configurations, allowing user input for component configuration.
26+
"!secret scalar", // YAML tag used to reference sensitive data stored in secrets.yaml, ensuring that sensitive information is not exposed in the main configuration files.
27+
"!include_dir_named scalar", // Custom tag that allows including all YAML files in a specified directory as named imports, useful for organizing configuration files by component or domain.
28+
"!include_dir_list scalar", // Custom tag for including a list of YAML files from a specified directory, typically used for grouping configurations of similar components.
29+
"!include_dir_merge_list scalar", // Custom tag for merging lists from multiple YAML files in a directory, useful for combining configurations without duplicating code.
30+
"!include_dir_merge_named scalar" // Custom tag for merging named imports from multiple YAML files, allowing more structured and organized configurations.
31+
],
32+
"[python]": {
33+
"editor.defaultFormatter": "charliermarsh.ruff" // Specifies the default formatter for Python code as 'ruff'.
34+
}
35+
}
36+
}
37+
},
38+
"remoteUser": "root"
39+
}

0 commit comments

Comments
 (0)