Merge pull request #445 from misl6/add-flake8

Add flake8
This commit is contained in:
Andre Miras 2020-04-14 23:57:39 +02:00 committed by GitHub
commit 85f849e187
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 40 additions and 0 deletions

View file

@ -3,6 +3,22 @@ name: kivy-ios
on: [push, pull_request]
jobs:
flake8:
name: Flake8 tests
runs-on: macos-latest
steps:
- name: Checkout kivy-ios
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v1.1.0
with:
python-version: 3.7
- name: Run flake8
run: |
python -m pip install --upgrade pip
pip install tox>=2.0
tox -e pep8
build_updated_recipes:
runs-on: macos-latest
steps:

24
tox.ini Normal file
View file

@ -0,0 +1,24 @@
[tox]
skipsdist = True
envlist = pep8
basepython = python3
[testenv]
deps = -r{toxinidir}/requirements.txt
setenv =
PYTHONPATH={toxinidir}
[testenv:pep8]
deps = flake8
commands = flake8 recipes/ tools/ tests/ .ci/ toolchain.py
[flake8]
ignore =
E123, # Closing bracket does not match indentation of opening bracket's line
E124, # Closing bracket does not match visual indentation
E126, # Continuation line over-indented for hanging indent
E226, # Missing whitespace around arithmetic operator
E402, # Module level import not at top of file
E501, # Line too long (82 > 79 characters)
W503, # Line break occurred before a binary operator
W504 # Line break occurred after a binary operator