-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update integration to HA v2024.1.0b0
- Loading branch information
Showing
27 changed files
with
501 additions
and
348 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pip==20.3.3 | ||
pre-commit==2.9.3 | ||
nox==2020.12.31 | ||
pip==22.2.2 | ||
pre-commit==2.20.0 | ||
nox==2022.8.7 |
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,42 +1,15 @@ | ||
name: Linting | ||
name: pre-commit | ||
|
||
# yamllint disable-line rule:truthy | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
- dev | ||
pull_request: | ||
push: | ||
branches: [master] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
name: pre-commit | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
python-version: "3.9" | ||
- run: | | ||
pip install --constraint=.github/workflows/constraints.txt pip | ||
pip install --constraint=.github/workflows/constraints.txt pre-commit | ||
- name: Compute cache key prefix | ||
if: matrix.os != 'windows-latest' | ||
id: cache_key_prefix | ||
shell: python | ||
run: | | ||
import hashlib | ||
import sys | ||
python = "py{}.{}".format(*sys.version_info[:2]) | ||
payload = sys.version.encode() + sys.executable.encode() | ||
digest = hashlib.sha256(payload).hexdigest() | ||
result = "${{ runner.os }}-{}-{}-pre-commit".format(python, digest) | ||
print("::set-output name=result::{}".format(result)) | ||
- uses: actions/[email protected] | ||
if: matrix.os != 'windows-latest' | ||
with: | ||
path: ~/.cache/pre-commit | ||
key: ${{ steps.cache_key_prefix.outputs.result }}-${{ hashFiles('.pre-commit-config.yaml') }} | ||
restore-keys: | | ||
${{ steps.cache_key_prefix.outputs.result }}- | ||
- run: pre-commit run --all-files --show-diff-on-failure --color=always | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v3 | ||
- uses: pre-commit/[email protected] |
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,63 +1,73 @@ | ||
--- | ||
|
||
repos: | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.32.1 | ||
rev: v3.15.0 | ||
hooks: | ||
- id: pyupgrade | ||
args: [ --py39 ] | ||
args: [--py39-plus] | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
rev: 23.12.1 | ||
hooks: | ||
- id: black | ||
args: | ||
- --safe | ||
- --quiet | ||
files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$ | ||
files: ^((custom_components)/.+)?[^/]+\.py$ | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.1.0 | ||
rev: v2.2.6 | ||
hooks: | ||
- id: codespell | ||
args: | ||
- --ignore-words-list=hass,alot,datas,dof,dur,ether,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing,iam,incomfort | ||
- --skip="./.*,*.csv,*.json" | ||
- --quiet-level=2 | ||
exclude_types: [csv, json] | ||
exclude: ^tests/fixtures/ | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.8.4 | ||
- repo: https://github.com/PyCQA/autoflake | ||
rev: v2.2.1 | ||
hooks: | ||
- id: autoflake | ||
args: | ||
- --in-place | ||
- --remove-all-unused-imports | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-docstrings==1.5.0 | ||
- pydocstyle==5.1.1 | ||
files: ^(homeassistant|script|tests)/.+\.py$ | ||
- pycodestyle>=2.10.0 | ||
- pyflakes>=3.0.1 | ||
# - flake8-docstrings==1.6.0 | ||
# - pydocstyle==6.2.3 | ||
- flake8-comprehensions>=3.10.1 | ||
- flake8-noqa>=1.3.0 | ||
- mccabe>=0.7.0 | ||
files: ^(custom_components)/.+\.py$ | ||
- repo: https://github.com/PyCQA/bandit | ||
rev: 1.7.4 | ||
rev: 1.7.6 | ||
hooks: | ||
- id: bandit | ||
args: | ||
- --quiet | ||
- --format=custom | ||
- --configfile=tests/bandit.yaml | ||
files: ^(homeassistant|script|tests)/.+\.py$ | ||
- --configfile=bandit.yaml | ||
files: ^(custom_components)/.+\.py$ | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.10.1 | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-executables-have-shebangs | ||
stages: [manual] | ||
- id: check-json | ||
exclude: (.vscode|.devcontainer) | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-added-large-files | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.33.0 | ||
hooks: | ||
- id: yamllint | ||
exclude: (.yamllint) | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v2.6.1 | ||
rev: v3.0.3 | ||
hooks: | ||
- id: prettier | ||
stages: [manual] |
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,61 @@ | ||
ignore: | | ||
azure-*.yml | ||
rules: | ||
braces: | ||
level: error | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 1 | ||
min-spaces-inside-empty: -1 | ||
max-spaces-inside-empty: -1 | ||
brackets: | ||
level: error | ||
min-spaces-inside: 0 | ||
max-spaces-inside: 0 | ||
min-spaces-inside-empty: -1 | ||
max-spaces-inside-empty: -1 | ||
colons: | ||
level: error | ||
max-spaces-before: 0 | ||
max-spaces-after: 1 | ||
commas: | ||
level: error | ||
max-spaces-before: 0 | ||
min-spaces-after: 1 | ||
max-spaces-after: 1 | ||
comments: | ||
level: error | ||
require-starting-space: true | ||
min-spaces-from-content: 2 | ||
comments-indentation: | ||
level: error | ||
document-end: | ||
level: error | ||
present: false | ||
document-start: | ||
level: error | ||
present: false | ||
empty-lines: | ||
level: error | ||
max: 1 | ||
max-start: 0 | ||
max-end: 1 | ||
hyphens: | ||
level: error | ||
max-spaces-after: 1 | ||
indentation: | ||
level: error | ||
spaces: 2 | ||
indent-sequences: true | ||
check-multi-line-strings: false | ||
key-duplicates: | ||
level: error | ||
line-length: disable | ||
new-line-at-end-of-file: | ||
level: error | ||
new-lines: | ||
level: error | ||
type: unix | ||
trailing-spaces: | ||
level: error | ||
truthy: | ||
level: error |
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
Oops, something went wrong.