diff --git a/jenkins-x-lint.yml b/jenkins-x-lint.yml index 6c74f5509c..61583c3cca 100644 --- a/jenkins-x-lint.yml +++ b/jenkins-x-lint.yml @@ -14,12 +14,13 @@ pipelineConfig: sh: "./add-pr-build-comment" - name: lint-checks parallel: - - name: python-lint-task + - name: lint-python + agent: + image: seldonio/python-builder:0.2 steps: - - name: python-lint - args: - - -C python - - setup_linter - - run_linter_check - command: make - + - name: lint-python + command: make + args: + - -C python + - install_dev + - run_linter_check diff --git a/python/Makefile b/python/Makefile index 807994dc37..42ad69038b 100644 --- a/python/Makefile +++ b/python/Makefile @@ -104,6 +104,7 @@ run_linter_check: black \ --check ./ ../testing \ --exclude "(testing/scripts/proto|seldon_core/proto/|.eggs|.tox)" + flake8 .PHONY: clean clean: diff --git a/python/requirements-dev.txt b/python/requirements-dev.txt index 0bce69c15b..3c547dd916 100644 --- a/python/requirements-dev.txt +++ b/python/requirements-dev.txt @@ -1,9 +1,11 @@ -r requirements.txt +black==19.10b0 +flake8==3.7.9 mypy<0.762 Pillow==7.0.0 -tox<4.0.0 pytest==5.3.1 pytest-cov==2.8.1 +tox<4.0.0 # 2nd lvl dep on cov required to avoid sqllite dep coverage==4.5.4 diff --git a/python/setup.cfg b/python/setup.cfg index 4e54aab354..8bdbdf80b6 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,6 +1,12 @@ [aliases] test=pytest +[flake8] +count = True +select = E9,F63,F7,F82 +show-source = True +statistics = True + [tox:tox] envlist = py