Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use flake8 to find syntax errors and undefined names #1443

Merged
merged 12 commits into from
Feb 17, 2020
Merged
17 changes: 9 additions & 8 deletions jenkins-x-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ pipelineConfig:
sh: "./add-pr-build-comment"
- name: lint-checks
parallel:
adriangonz marked this conversation as resolved.
Show resolved Hide resolved
- name: python-lint-task
- name: lint-python
agent:
image: seldonio/python-builder:0.2
steps:
adriangonz marked this conversation as resolved.
Show resolved Hide resolved
- 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
1 change: 1 addition & 0 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ run_linter_check:
black \
--check ./ ../testing \
--exclude "(testing/scripts/proto|seldon_core/proto/|.eggs|.tox)"
flake8

.PHONY: clean
clean:
Expand Down
4 changes: 3 additions & 1 deletion python/requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions python/setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
[aliases]
test=pytest

[flake8]
count = True
select = E9,F63,F7,F82
show-source = True
statistics = True

[tox:tox]
envlist =
py
Expand Down