-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Many bug fixes and fixes of deprecated code, update of dev environmen…
…t and dependencies
- Loading branch information
1 parent
34d88ff
commit 36d6f77
Showing
35 changed files
with
933 additions
and
700 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,26 @@ | ||
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "devcontainers" | ||
directory: "/" | ||
labels: | ||
- "pr: dependency-update" | ||
schedule: | ||
interval: weekly | ||
time: "06:00" | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
labels: | ||
- "pr: dependency-update" | ||
schedule: | ||
interval: "weekly" | ||
|
||
- package-ecosystem: "pip" | ||
interval: weekly | ||
time: "06:00" | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: pip | ||
directory: "/" | ||
labels: | ||
- "pr: dependency-update" | ||
schedule: | ||
interval: "weekly" | ||
ignore: | ||
# Dependabot should not update Home Assistant as that should match the homeassistant key in hacs.json | ||
- dependency-name: "homeassistant" | ||
interval: weekly | ||
time: "06:00" | ||
open-pull-requests-limit: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,88 @@ | ||
repos: | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.34.0 | ||
- repo: local | ||
hooks: | ||
- id: pyupgrade | ||
stages: [manual] | ||
- id: codespell | ||
name: Check code for common misspellings | ||
language: system | ||
types: [text] | ||
stages: [commit-msg, post-commit, manual] | ||
entry: codespell | ||
args: | ||
- "--py39-plus" | ||
- --quiet-level=2 | ||
- --ignore-words-list=hass,ba,fo | ||
- --skip=tests/fixtures/*,custom_components/garmin_connect/translations/* | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
name: Sort imports | ||
language: system | ||
types: [text] | ||
stages: [commit-msg, post-commit, manual] | ||
entry: isort | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
stages: [manual] | ||
- id: pyupgrade | ||
name: Run pyupgrade | ||
language: system | ||
types: [text] | ||
stages: [commit-msg, post-commit, manual] | ||
entry: pyupgrade | ||
files: ^.*.py$ | ||
args: | ||
- --safe | ||
- --quiet | ||
files: ^((custom_components|script|tests)/.+)?[^/]+\.py$ | ||
- "--py39-plus" | ||
|
||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.1.0 | ||
hooks: | ||
- id: codespell | ||
stages: [manual] | ||
- id: ruff-check | ||
name: Run ruff check | ||
language: system | ||
types: [text] | ||
stages: [commit-msg, post-commit, manual] | ||
entry: ruff | ||
args: | ||
- --quiet-level=2 | ||
- --ignore-words-list=hass,ba,fo | ||
- --exclude-file=custom_components/hacs/utils/default.repositories | ||
- check | ||
files: ^((action|custom_components|script|tests)/.+)?[^/]+\.py$ | ||
|
||
- id: ruff-format | ||
name: Run ruff format | ||
language: system | ||
types: [text] | ||
stages: [commit-msg, post-commit, manual] | ||
entry: ruff | ||
args: | ||
- format | ||
files: ^((action|custom_components|script)/.+)?[^/]+\.py$ | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: check-executables-have-shebangs | ||
stages: [manual] | ||
name: Check that executables have shebangs | ||
language: system | ||
types: [text, executable] | ||
entry: check-executables-have-shebangs | ||
stages: [commit-msg, post-commit, manual] | ||
|
||
- id: check-json | ||
stages: [manual] | ||
name: Check JSON files | ||
language: system | ||
types: [json] | ||
stages: [commit-msg, post-commit, manual] | ||
entry: check-json | ||
|
||
- id: requirements-txt-fixer | ||
stages: [manual] | ||
name: Check requirements files | ||
language: system | ||
types: [text] | ||
stages: [commit-msg, post-commit, manual] | ||
entry: requirements-txt-fixer | ||
files: ^requirements_.*.txt$ | ||
|
||
- id: check-ast | ||
stages: [manual] | ||
name: Check Python AST | ||
language: system | ||
types: [python] | ||
stages: [commit-msg, post-commit, manual] | ||
entry: check-ast | ||
|
||
- id: mixed-line-ending | ||
stages: [manual] | ||
name: Check line nedings | ||
language: system | ||
types: [text] | ||
stages: [commit-msg, post-commit, manual] | ||
entry: mixed-line-ending | ||
args: | ||
- --fix=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"configurations": [ | ||
{ | ||
"justMyCode": false, | ||
"name": "Python: Attach Local", | ||
"pathMappings": [ | ||
{ | ||
"localRoot": "${workspaceFolder}", | ||
"remoteRoot": "." | ||
} | ||
], | ||
"request": "attach", | ||
"type": "debugpy" | ||
}, | ||
{ | ||
"name": "Python: Attach Remote", | ||
"pathMappings": [ | ||
{ | ||
"localRoot": "${workspaceFolder}", | ||
"remoteRoot": "/usr/src/homeassistant" | ||
} | ||
], | ||
"request": "attach", | ||
"type": "debugpy" | ||
} | ||
], | ||
"version": "0.2.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"tasks": [ | ||
{ | ||
"command": "scripts/develop", | ||
"label": "Run Home Assistant", | ||
"problemMatcher": [], | ||
"type": "shell" | ||
}, | ||
{ | ||
"command": "scripts/setup", | ||
"label": "Upgrade environment", | ||
"problemMatcher": [], | ||
"type": "shell" | ||
}, | ||
{ | ||
"command": "scripts/test", | ||
"label": "Run tests", | ||
"problemMatcher": [], | ||
"type": "shell" | ||
}, | ||
{ | ||
"command": "scripts/lint", | ||
"label": "Run lint checks", | ||
"problemMatcher": [], | ||
"type": "shell" | ||
} | ||
], | ||
"version": "2.0.0" | ||
} |
Oops, something went wrong.