-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit setup, SVG icon, HACS configuration
- Loading branch information
Showing
5 changed files
with
197 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,135 @@ | ||
--- | ||
files: ^(.*\.(py|json|md|sh|yaml|cfg|txt))$ | ||
exclude: ^(\.[^/]*cache/.*|.*/_user.py)$ | ||
repos: | ||
- repo: https://github.com/verhovsky/pyupgrade-docs | ||
rev: v0.3.0 | ||
hooks: | ||
- id: pyupgrade-docs | ||
- repo: https://github.com/executablebooks/mdformat | ||
# Do this before other tools "fixing" the line endings | ||
rev: 0.7.16 | ||
hooks: | ||
- id: mdformat | ||
name: Format Markdown | ||
entry: mdformat # Executable to run, with fixed options | ||
language: python | ||
types: [markdown] | ||
args: [--wrap, '75', --number] | ||
additional_dependencies: | ||
- mdformat-toc | ||
- mdformat-beautysh | ||
# -mdformat-shfmt | ||
# -mdformat-tables | ||
- mdformat-config | ||
- mdformat-black | ||
- mdformat-web | ||
- mdformat-gfm | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: 1.13.0 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black==22.6.0] | ||
stages: [manual] # Manual because already done by mdformat-black | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: no-commit-to-branch | ||
args: [--branch, main] | ||
- id: check-yaml | ||
args: [--unsafe] | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- id: check-json | ||
- id: mixed-line-ending | ||
- id: check-builtin-literals | ||
- id: check-ast | ||
- id: check-merge-conflict | ||
- id: check-executables-have-shebangs | ||
- id: check-shebang-scripts-are-executable | ||
- id: check-docstring-first | ||
- id: fix-byte-order-marker | ||
- id: check-case-conflict | ||
# - id: check-toml | ||
- repo: https://github.com/adrienverge/yamllint.git | ||
rev: v1.29.0 | ||
hooks: | ||
- id: yamllint | ||
args: | ||
- --no-warnings | ||
- -d | ||
- '{extends: relaxed, rules: {line-length: {max: 90}}}' | ||
- repo: https://github.com/lovesegfault/beautysh.git | ||
rev: v6.2.1 | ||
hooks: | ||
- id: beautysh | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.3.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: | ||
- --py310-plus | ||
- repo: https://github.com/psf/black | ||
rev: 22.12.0 | ||
hooks: | ||
- id: black | ||
args: | ||
- --safe | ||
- --quiet | ||
- -l 79 | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks-bandit | ||
rev: v1.0.6 | ||
hooks: | ||
- id: python-bandit-vulnerability-check | ||
- repo: https://github.com/fsouza/autoflake8 | ||
rev: v0.4.0 | ||
hooks: | ||
- id: autoflake8 | ||
args: | ||
- -i | ||
- -r | ||
- --expand-star-imports | ||
- custom_components | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
# - pyproject-flake8>=0.0.1a5 | ||
- flake8-bugbear>=22.7.1 | ||
- flake8-comprehensions>=3.10.1 | ||
- flake8-2020>=1.7.0 | ||
- mccabe>=0.7.0 | ||
- pycodestyle>=2.9.1 | ||
- pyflakes>=2.5.0 | ||
- repo: https://github.com/PyCQA/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.2 | ||
hooks: | ||
- id: codespell | ||
args: | ||
# - --builtin=clear,rare,informal,usage,code,names,en-GB_to_en-US | ||
- --builtin=clear,rare,informal,usage,code,names | ||
- --ignore-words-list=hass,master | ||
- --skip="./.*" | ||
- --quiet-level=2 | ||
- repo: https://github.com/pre-commit/mirrors-pylint | ||
rev: v3.0.0a5 | ||
hooks: | ||
- id: pylint | ||
additional_dependencies: | ||
- homeassistant-stubs==2023.2.1 | ||
- sqlalchemy | ||
- pyyaml | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.991 | ||
hooks: | ||
- id: mypy | ||
additional_dependencies: | ||
- homeassistant-stubs==2023.2.1 | ||
- sqlalchemy | ||
- pyyaml |
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,8 @@ | ||
{ | ||
"name": "Delorian - Testing integration for historical sensors", | ||
"content_in_root": false, | ||
"zip_release": false, | ||
"render_readme": true, | ||
"persistent_directory": "local", | ||
"homeassistant": "2023.1" | ||
} |
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