Skip to content

Commit

Permalink
Merge pull request #467 from alandtse/teslajsonpy3.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse authored Dec 30, 2022
2 parents b2c5b30 + edd0e80 commit c1fe52c
Show file tree
Hide file tree
Showing 39 changed files with 337 additions and 293 deletions.
6 changes: 2 additions & 4 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"name": "Tesla Custom Component development",
"image": "ghcr.io/ludeeus/devcontainer/integration:stable",
"appPort": [
"9123:8123"
],
"appPort": ["9123:8123"],
"postCreateCommand": "bash .devcontainer/post-create.sh",
"extensions": [
"ms-python.python",
Expand All @@ -30,4 +28,4 @@
"editor.formatOnType": true,
"files.trimTrailingWhitespace": true
}
}
}
2 changes: 1 addition & 1 deletion .github/workflows/lintpr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
steps:
- uses: amannn/action-semantic-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52 changes: 37 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ repos:
- id: debug-statements
- id: check-toml
- id: check-json
exclude: >
(?x)^(
.vscode/settings.json|
.vscode/launch.json
)$
# This one is slow and doesn't check for much
# - detect-private-key
# This is very slow, so I recommend disabling it.
Expand All @@ -30,14 +35,14 @@ repos:
- id: check-yaml
exclude: ^recipes/.*
repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0

# --- Commit msg checks ---
- hooks:
- id: commitizen
stages: ["commit-msg"]
repo: https://github.com/commitizen-tools/commitizen
rev: v2.28.0
rev: v2.38.0
# --- Linters ---
- hooks:
- id: dockerfile_lint
Expand All @@ -46,18 +51,18 @@ repos:
- hooks:
- id: black
repo: https://github.com/psf/black
rev: 22.6.0
rev: 23.1a1
- repo: https://github.com/pre-commit/mirrors-prettier
hooks:
- id: prettier
rev: v2.7.1
rev: v3.0.0-alpha.4
- repo: https://github.com/asottile/pyupgrade
rev: v2.35.0
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py38-plus]
- repo: https://github.com/PyCQA/prospector
rev: 1.7.7
rev: v1.8.3
hooks:
- id: prospector
exclude: ^(tests)/.+\.py$
Expand All @@ -71,14 +76,31 @@ repos:
- --configfile=tests/bandit.yaml
files: ^(tests)/.+\.py$
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
rev: 5.11.4
hooks:
- id: isort
# - repo: local
# hooks:
# - id: pytest-check
# name: pytest-check
# entry: pytest
# language: system
# pass_filenames: false
# always_run: true
# - repo: local
# hooks:
# - id: pytest-check
# name: pytest-check
# entry: pytest
# language: system
# pass_filenames: false
# always_run: true
- repo: https://github.com/floatingpurr/sync_with_poetry
rev: "0.4.0" # the revision or tag to clone at
hooks:
- id: sync_with_poetry
args: [] # optional args

ci:
autofix_commit_msg: |
style: auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
autofix_prs: true
autoupdate_branch: ""
autoupdate_commit_msg: "build: pre-commit autoupdate"
autoupdate_schedule: weekly
skip: []
submodules: false
62 changes: 31 additions & 31 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
// Example of attaching to local debug server
"name": "Python: Attach Local",
"type": "python",
"request": "attach",
"port": 5678,
"justMyCode": false,
"host": "localhost",
"pathMappings": [
{
// Example of attaching to local debug server
"name": "Python: Attach Local",
"type": "python",
"request": "attach",
"port": 5678,
"justMyCode": false,
"host": "localhost",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
]
},
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
]
},
{
// Example of attaching to my production server
"name": "Python: Attach Remote",
"type": "python",
"request": "attach",
"port": 5678,
"host": "homeassistant.local",
"pathMappings": [
{
// Example of attaching to my production server
"name": "Python: Attach Remote",
"type": "python",
"request": "attach",
"port": 5678,
"host": "homeassistant.local",
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "/usr/src/homeassistant"
}
]
"localRoot": "${workspaceFolder}",
"remoteRoot": "/usr/src/homeassistant"
}
]
}
]
}
]
}
16 changes: 7 additions & 9 deletions .vscode/settings.default.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
{
"python.testing.pytestArgs": [
"tests"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"files.associations": {
"*.yaml": "home-assistant"
}
}
"python.testing.pytestArgs": ["tests"],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"files.associations": {
"*.yaml": "home-assistant"
}
}
68 changes: 34 additions & 34 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Run Home Assistant on port 9123",
"type": "shell",
"command": "container start",
"problemMatcher": []
},
{
"label": "Run Home Assistant configuration against /config",
"type": "shell",
"command": "container check",
"problemMatcher": []
},
{
"label": "Upgrade Home Assistant to latest dev",
"type": "shell",
"command": "container install",
"problemMatcher": []
},
{
"label": "Install a specific version of Home Assistant",
"type": "shell",
"command": "container set-version",
"problemMatcher": []
},
{
"label": "Serve Documentation on port 8000",
"type": "shell",
"command": "mkdocs -v serve",
"problemMatcher": []
}
]
}
"version": "2.0.0",
"tasks": [
{
"label": "Run Home Assistant on port 9123",
"type": "shell",
"command": "container start",
"problemMatcher": []
},
{
"label": "Run Home Assistant configuration against /config",
"type": "shell",
"command": "container check",
"problemMatcher": []
},
{
"label": "Upgrade Home Assistant to latest dev",
"type": "shell",
"command": "container install",
"problemMatcher": []
},
{
"label": "Install a specific version of Home Assistant",
"type": "shell",
"command": "container set-version",
"problemMatcher": []
},
{
"label": "Serve Documentation on port 8000",
"type": "shell",
"command": "mkdocs -v serve",
"problemMatcher": []
}
]
}
Loading

0 comments on commit c1fe52c

Please sign in to comment.