2019-07-30 23:59:12 +00:00
|
|
|
repos:
|
2020-04-05 10:49:57 +00:00
|
|
|
- repo: https://github.com/asottile/pyupgrade
|
2020-08-08 10:36:12 +00:00
|
|
|
rev: v2.7.2
|
2020-04-05 10:49:57 +00:00
|
|
|
hooks:
|
|
|
|
- id: pyupgrade
|
|
|
|
args: [--py37-plus]
|
2020-02-20 17:34:30 +00:00
|
|
|
- repo: https://github.com/psf/black
|
2020-08-27 11:56:20 +00:00
|
|
|
rev: 20.8b1
|
2019-07-30 23:59:12 +00:00
|
|
|
hooks:
|
2020-02-20 17:34:30 +00:00
|
|
|
- id: black
|
2019-07-30 23:59:12 +00:00
|
|
|
args:
|
|
|
|
- --safe
|
|
|
|
- --quiet
|
2019-10-18 19:20:27 +00:00
|
|
|
files: ^((homeassistant|script|tests)/.+)?[^/]+\.py$
|
2020-02-20 17:34:30 +00:00
|
|
|
- repo: https://github.com/codespell-project/codespell
|
2020-08-08 12:41:02 +00:00
|
|
|
rev: v1.17.1
|
2020-01-31 16:33:00 +00:00
|
|
|
hooks:
|
2020-02-20 17:34:30 +00:00
|
|
|
- id: codespell
|
2020-01-31 16:33:00 +00:00
|
|
|
args:
|
2020-08-08 12:41:02 +00:00
|
|
|
- --ignore-words-list=hass,alot,datas,dof,dur,farenheit,hist,iff,ines,ist,lightsensor,mut,nd,pres,referer,ser,serie,te,technik,ue,uint,visability,wan,wanna,withing,iam,incomfort
|
2020-05-03 00:54:16 +00:00
|
|
|
- --skip="./.*,*.csv,*.json"
|
2020-01-31 16:33:00 +00:00
|
|
|
- --quiet-level=2
|
2020-05-03 00:54:16 +00:00
|
|
|
exclude_types: [csv, json]
|
2020-02-20 17:34:30 +00:00
|
|
|
- repo: https://gitlab.com/pycqa/flake8
|
2020-07-05 09:03:22 +00:00
|
|
|
rev: 3.8.3
|
2019-08-18 04:15:55 +00:00
|
|
|
hooks:
|
2020-02-20 17:34:30 +00:00
|
|
|
- id: flake8
|
2019-08-18 04:15:55 +00:00
|
|
|
additional_dependencies:
|
2019-11-05 05:21:52 +00:00
|
|
|
- flake8-docstrings==1.5.0
|
2020-08-31 08:20:39 +00:00
|
|
|
- pydocstyle==5.1.1
|
2019-10-18 19:20:27 +00:00
|
|
|
files: ^(homeassistant|script|tests)/.+\.py$
|
2020-02-20 17:34:30 +00:00
|
|
|
- repo: https://github.com/PyCQA/bandit
|
2019-11-18 08:10:15 +00:00
|
|
|
rev: 1.6.2
|
|
|
|
hooks:
|
2020-02-20 17:34:30 +00:00
|
|
|
- id: bandit
|
2019-11-18 08:10:15 +00:00
|
|
|
args:
|
|
|
|
- --quiet
|
|
|
|
- --format=custom
|
|
|
|
- --configfile=tests/bandit.yaml
|
|
|
|
files: ^(homeassistant|script|tests)/.+\.py$
|
2020-08-29 06:23:55 +00:00
|
|
|
- repo: https://github.com/timothycrosley/isort
|
|
|
|
rev: 5.4.2
|
2019-12-12 14:58:47 +00:00
|
|
|
hooks:
|
2020-02-20 17:34:30 +00:00
|
|
|
- id: isort
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2020-08-08 13:01:57 +00:00
|
|
|
rev: v3.2.0
|
2019-12-16 10:06:17 +00:00
|
|
|
hooks:
|
2020-04-05 16:45:43 +00:00
|
|
|
- id: check-executables-have-shebangs
|
2020-08-17 20:50:00 +00:00
|
|
|
stages: [manual]
|
2020-02-20 17:34:30 +00:00
|
|
|
- id: check-json
|
|
|
|
- id: no-commit-to-branch
|
|
|
|
args:
|
|
|
|
- --branch=dev
|
|
|
|
- --branch=master
|
|
|
|
- --branch=rc
|
2020-04-05 08:33:45 +00:00
|
|
|
- repo: https://github.com/adrienverge/yamllint.git
|
2020-08-08 11:18:37 +00:00
|
|
|
rev: v1.24.2
|
2020-04-05 08:33:45 +00:00
|
|
|
hooks:
|
|
|
|
- id: yamllint
|
2020-04-05 15:27:16 +00:00
|
|
|
- repo: https://github.com/prettier/prettier
|
2020-04-06 17:53:39 +00:00
|
|
|
rev: 2.0.4
|
2020-04-05 15:27:16 +00:00
|
|
|
hooks:
|
|
|
|
- id: prettier
|
2020-04-06 17:53:39 +00:00
|
|
|
stages: [manual]
|
2020-02-20 17:34:30 +00:00
|
|
|
- repo: local
|
2020-02-01 15:12:46 +00:00
|
|
|
hooks:
|
2020-02-20 17:34:30 +00:00
|
|
|
# Run mypy through our wrapper script in order to get the possible
|
|
|
|
# pyenv and/or virtualenv activated; it may not have been e.g. if
|
|
|
|
# committing from a GUI tool that was not launched from an activated
|
|
|
|
# shell.
|
|
|
|
- id: mypy
|
2020-02-01 15:12:46 +00:00
|
|
|
name: mypy
|
|
|
|
entry: script/run-in-env.sh mypy
|
|
|
|
language: script
|
|
|
|
types: [python]
|
|
|
|
require_serial: true
|
|
|
|
files: ^homeassistant/.+\.py$
|
2020-03-17 20:03:43 +00:00
|
|
|
- id: gen_requirements_all
|
|
|
|
name: gen_requirements_all
|
2020-03-25 07:47:01 +00:00
|
|
|
entry: script/run-in-env.sh python3 -m script.gen_requirements_all
|
2020-03-17 20:03:43 +00:00
|
|
|
pass_filenames: false
|
2020-03-25 07:47:01 +00:00
|
|
|
language: script
|
2020-05-14 05:24:27 +00:00
|
|
|
types: [text]
|
|
|
|
files: ^(homeassistant/.+/manifest\.json|\.pre-commit-config\.yaml)$
|
2020-03-17 20:03:43 +00:00
|
|
|
- id: hassfest
|
|
|
|
name: hassfest
|
2020-03-25 07:47:01 +00:00
|
|
|
entry: script/run-in-env.sh python3 -m script.hassfest
|
2020-03-17 20:03:43 +00:00
|
|
|
pass_filenames: false
|
2020-03-25 07:47:01 +00:00
|
|
|
language: script
|
2020-03-17 20:03:43 +00:00
|
|
|
types: [json]
|
2020-04-15 23:58:20 +00:00
|
|
|
files: ^homeassistant/.+/(manifest|strings)\.json$
|