Skip to content

Commit d1f7b95

Browse files
committed
added pylint to pre-commit and githib workflow push and PR
1 parent 0799187 commit d1f7b95

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.github/workflows/validate.yml

+11
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,14 @@ jobs:
3232
python-version: "3.x"
3333
- run: python3 -m pip install -r tests/requirements_test.txt
3434
- run: pytest --cov=custom_components
35+
36+
pylint:
37+
runs-on: "ubuntu-latest"
38+
name: Run pylint
39+
steps:
40+
- uses: "actions/checkout@v2"
41+
- uses: "actions/setup-python@v1"
42+
with:
43+
python-version: "3.x"
44+
- run: python3 -m pip install -r tests/requirements_test.txt
45+
- run: pylint custom_components/pyscript/*.py tests/*.py

.pre-commit-config.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,11 @@ repos:
4747
rev: v1.23.0
4848
hooks:
4949
- id: yamllint
50+
- repo: local
51+
hooks:
52+
- id: pylint
53+
name: pylint
54+
args: [-j 0]
55+
entry: venv/bin/pylint
56+
language: system
57+
files: ^(custom_components|tests)/.+\.py$

tests/requirements_test.txt

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
croniter>=0.3.34
2+
mock-open==1.4.0
23
pre-commit
34
pytest
45
pytest-cov>=2.9.0
56
pytest-homeassistant
7+
pylint==2.6.0
8+
pylint-strict-informational==0.1

0 commit comments

Comments
 (0)