From 8a0c656ba5232b5c4004c156fc4d7f83629fc0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20St=C3=BCrmer?= Date: Sat, 7 Aug 2021 15:20:08 +0200 Subject: [PATCH] Tweak devcontainer and enable stricter type checking (#99) --- .devcontainer/devcontainer.json | 7 +++++-- pyproject.toml | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index df9754f..5edc9aa 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -18,13 +18,16 @@ ], "settings": { "terminal.integrated.defaultProfile.linux": "zsh", - "python.venvPath": "~/.cache/pypoetry/virtualenvs", + "python.venvPath": "/home/vscode/.cache/pypoetry/virtualenvs", "python.linting.enabled": true, "python.linting.pylintEnabled": false, "python.linting.flake8Enabled": true, "python.formatting.provider": "black", "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "esbenp.prettier-vscode", + "[python]": { + "editor.defaultFormatter": "ms-python.python" + } }, "remoteUser": "vscode", "postCreateCommand": "poetry install" diff --git a/pyproject.toml b/pyproject.toml index 5e48e47..7bf796a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,3 +21,9 @@ pytest-homeassistant-custom-component = "^0.2.1" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" + +[tool.pyright] +typeCheckingMode = "strict" +reportMissingTypeStubs = "warning" +reportImportCycles = "warning" +useLibraryCodeForTypes = true