Copy default vscode settings during bootstrap (#43180)
parent
37361a6332
commit
6daf40b254
|
@ -12,10 +12,14 @@
|
|||
"redhat.vscode-yaml",
|
||||
"esbenp.prettier-vscode"
|
||||
],
|
||||
// Please keep this file in sync with settings in home-assistant/.vscode/settings.default.json
|
||||
"settings": {
|
||||
"python.pythonPath": "/usr/local/bin/python",
|
||||
"python.linting.pylintEnabled": true,
|
||||
"python.linting.enabled": true,
|
||||
"python.formatting.provider": "black",
|
||||
"python.testing.pytestArgs": ["--no-cov"],
|
||||
"python.testing.pytestEnabled": true,
|
||||
"editor.formatOnPaste": false,
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnType": true,
|
||||
|
|
|
@ -48,7 +48,7 @@ repos:
|
|||
- id: check-executables-have-shebangs
|
||||
stages: [manual]
|
||||
- id: check-json
|
||||
exclude: .vscode
|
||||
exclude: (.vscode|.devcontainer)
|
||||
- id: no-commit-to-branch
|
||||
args:
|
||||
- --branch=dev
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
// Please keep this file in sync with settings in home-assistant/.devcontainer/devcontainer.json
|
||||
"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"]
|
||||
"python.testing.pytestArgs": ["--no-cov"],
|
||||
// https://code.visualstudio.com/docs/python/testing#_pytest-configuration-settings
|
||||
"python.testing.pytestEnabled": true
|
||||
}
|
|
@ -6,6 +6,14 @@ set -e
|
|||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# Add default vscode settings if not existing
|
||||
SETTINGS_FILE=./.vscode/settings.json
|
||||
SETTINGS_TEMPLATE_FILE=./.vscode/settings.default.json
|
||||
if [ ! -f "$SETTINGS_FILE" ]; then
|
||||
echo "Copy $SETTINGS_TEMPLATE_FILE to $SETTINGS_FILE."
|
||||
cp "$SETTINGS_TEMPLATE_FILE" "$SETTINGS_FILE"
|
||||
fi
|
||||
|
||||
echo "Installing development dependencies..."
|
||||
python3 -m pip install wheel --constraint homeassistant/package_constraints.txt
|
||||
python3 -m pip install tox colorlog pre-commit $(grep mypy requirements_test.txt) $(grep stdlib-list requirements_test.txt) $(grep tqdm requirements_test.txt) $(grep pipdeptree requirements_test.txt) --constraint homeassistant/package_constraints.txt
|
||||
|
|
Loading…
Reference in New Issue