diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b95f5e4b6..a0120db5d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/linters-requirements.txt b/linters-requirements.txt index 4ee9f0d31..b690b2ce1 100644 --- a/linters-requirements.txt +++ b/linters-requirements.txt @@ -2,4 +2,4 @@ ansible-lint==4.2.0 # MIT pre-commit >= 2.6.0 # MIT -pylint>=2.5.2 # GPLv2 +pylint>=2.5.2 # GPLv2 diff --git a/tox.ini b/tox.ini index 1085af95f..4ab482a66 100644 --- a/tox.ini +++ b/tox.ini @@ -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]