Add pylint pre-commit hook

Change-Id: Id933664460ef15dc2c8a968309de232626aeb5b9
This commit is contained in:
Federico Ressi 2020-07-03 08:01:53 +02:00
parent 7b22fc3468
commit c1378755b1
3 changed files with 12 additions and 5 deletions

View File

@ -34,6 +34,15 @@ repos:
pass_filenames: false
# args: [--ignore-missing-imports]
- repo: local
hooks:
- id: pylint
files: ^tobiko/
name: pylint
entry: pylint -j0 --max-line-length=80 -E -e W,E -d unused-import,broad-except,fixme
language: system
types: [python]
# - repo: https://github.com/adrienverge/yamllint.git
# rev: v1.23.0

View File

@ -93,8 +93,7 @@ basepython = {[testenv:pep8]basepython}
deps = {[testenv:pep8]deps}
envdir = {toxworkdir}/pep8
commands =
pylint -j0 --max-line-length=80 -E -e W,E \
-d unused-import,broad-except,fixme tobiko
pre-commit run -a pylint
[testenv:linters]
@ -112,8 +111,6 @@ commands =
xargs -t -n1 -P 16 ansible-lint -xANSIBLE0012'
bash -c 'find playbooks infrared_plugin -maxdepth 2 -type f -regex '.*.y[a]ml' | \
xargs -t -n1 -P 16 ansible-lint -xANSIBLE0012'
pylint -j0 --max-line-length=80 -E -e W,E \
-d unused-import,broad-except,fixme tobiko
[flake8]
@ -130,6 +127,7 @@ application-import-names = tobiko
max-complexity = 10
import-order-style = pep8
# --- integration test environments ------------------------------------------
[integration]