Skip to content

Commit

Permalink
Update devcontainer to python 3.12 and replace linters/formatters wit…
Browse files Browse the repository at this point in the history
…h ruff
  • Loading branch information
natekspencer committed Feb 29, 2024
1 parent a0a6fc3 commit 83ef921
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 22 deletions.
17 changes: 7 additions & 10 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
"name": "Home Assistant integration development",
"image": "mcr.microsoft.com/vscode/devcontainers/python:0-3.11-bullseye",
"image": "mcr.microsoft.com/devcontainers/python:1-3.12-bullseye",
"postCreateCommand": ".devcontainer/setup",
"postAttachCommand": ".devcontainer/setup",
"forwardPorts": [8123],
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.black-formatter",
"ms-python.isort",
"ms-python.pylint",
"ms-python.vscode-pylance",
"esbenp.prettier-vscode",
"github.vscode-pull-request-github",
"ryanluker.vscode-coverage-gutters"
"ryanluker.vscode-coverage-gutters",
"charliermarsh.ruff"
],
"settings": {
"files.eol": "\n",
"editor.tabSize": 4,
"python.pythonPath": "/usr/bin/python3",
"python.analysis.autoSearchPaths": false,
"python.formatting.provider": "black",
"editor.formatOnPaste": false,
"editor.formatOnSave": true,
"editor.formatOnType": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
"files.trimTrailingWhitespace": true
"files.trimTrailingWhitespace": true,
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
}
},
Expand Down
15 changes: 6 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@

[tool.isort]
# https://pycqa.github.io/isort/docs/configuration/options.html
profile = "black"
# will group `import x` and `from x import` of the same module.
force_sort_within_sections = true
known_first_party = ["homeassistant", "tests"]
forced_separate = ["tests"]
combine_as_imports = true
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = ["homeassistant", "tests"]
forced-separate = ["tests"]
combine-as-imports = true
split-on-trailing-comma = false
4 changes: 1 addition & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ deepdiff
ical

# Development
black
colorlog==6.7.0
pip>=21.0
pylint>=2.17.3
ruff==0.0.255
ruff==0.2.2

0 comments on commit 83ef921

Please sign in to comment.