From 2e7fcc9dc02efa3b00a39e448a2a0db6e867e50b Mon Sep 17 00:00:00 2001 From: mib1185 Date: Fri, 21 Jan 2022 20:34:33 +0000 Subject: [PATCH 1/2] add pylint to pre-commit --- .pre-commit-config.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c48ac076b378c7..68860be9d113e5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -95,6 +95,11 @@ repos: types: [python] require_serial: true files: ^homeassistant/.+\.py$ + - id: pylint + name: pylint + entry: pylint + language: system + types: [python] - id: gen_requirements_all name: gen_requirements_all entry: script/run-in-env.sh python3 -m script.gen_requirements_all From fc0917e5258cb6bfae3bee6ea4b139250d4b5a36 Mon Sep 17 00:00:00 2001 From: mib1185 Date: Fri, 21 Jan 2022 21:01:10 +0000 Subject: [PATCH 2/2] add parallelism, run in pyenv/virtualenv --- .pre-commit-config.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 68860be9d113e5..09ac9423479404 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -97,9 +97,10 @@ repos: files: ^homeassistant/.+\.py$ - id: pylint name: pylint - entry: pylint - language: system + entry: script/run-in-env.sh pylint -j 0 + language: script types: [python] + files: ^homeassistant/.+\.py$ - id: gen_requirements_all name: gen_requirements_all entry: script/run-in-env.sh python3 -m script.gen_requirements_all