diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index fc07d32bfc8..6c17601b98a 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -16,13 +16,13 @@ "python.pythonPath": "/usr/local/bin/python", "python.linting.pylintEnabled": true, "python.linting.enabled": true, - "python.formatting.provider": "black", "editor.formatOnPaste": false, "editor.formatOnSave": true, "editor.formatOnType": true, "files.trimTrailingWhitespace": true, "terminal.integrated.shell.linux": "/bin/bash", "yaml.customTags": [ + "!placeholder scalar", "!secret scalar", "!include_dir_named scalar", "!include_dir_list scalar", diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 43dcb903650..e2fbe9761d0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -48,6 +48,7 @@ repos: - id: check-executables-have-shebangs stages: [manual] - id: check-json + exclude: .vscode - id: no-commit-to-branch args: - --branch=dev diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..6976e26ebb2 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Home Assistant", + "type": "python", + "request": "launch", + "module": "homeassistant", + "args": ["--debug", "-c", "config"] + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..910db092e70 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,8 @@ +{ + "python.formatting.provider": "black", + // https://code.visualstudio.com/docs/python/testing#_pytest-configuration-settings + "python.testing.pytestEnabled": true, + // Added --no-cov to work around TypeError: message must be set + // https://github.com/microsoft/vscode-python/issues/14067 + "python.testing.pytestArgs": ["--no-cov"] +}