Move linting opts from github workflow to config files

This helps development where you can be sure that running locally

black .
flake8 .

will do the same as in the github job.
This commit is contained in:
Boian Petkantchin
2023-03-01 11:11:41 -08:00
committed by Boian Petkantchin
parent 996c645f6a
commit 783538fe11
4 changed files with 12 additions and 6 deletions

View File

@@ -99,11 +99,12 @@ jobs:
run: |
# black format check
black --version
black --line-length 79 --check .
black --check .
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude lit.cfg.py
flake8 . --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --exclude lit.cfg.py
flake8 . --isolated --count --exit-zero --max-complexity=10 --max-line-length=127 \
--statistics --exclude lit.cfg.py
- name: Validate Models on CPU
if: matrix.suite == 'cpu'