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

add flake8 linting to Makefile and github actions #1399

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .flake8
@@ -0,0 +1,5 @@
[flake8]
max-line-length = 120
exclude =
.tox
.git
2 changes: 1 addition & 1 deletion .github/workflows/install-deps.sh
Expand Up @@ -3,7 +3,7 @@ set -e
set -x

# Test utilities
pip install -U pip pytest coverage
pip install -U pip pytest coverage flake8

# Test dependencies (Server back-ends and template engines)
sudo apt-get install -y libev-dev
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/run_tests.yml
Expand Up @@ -16,5 +16,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: .github/workflows/install-deps.sh
- name: Run flake8
run: flake8 bottle.py
- name: Run tests
run: pytest
5 changes: 4 additions & 1 deletion Makefile
Expand Up @@ -19,7 +19,7 @@ $(VENV)/.installed: Makefile
python3 -mvenv $(VENV)
$(VENV)/bin/python3 -mensurepip
$(VENV)/bin/pip install -U pip
$(VENV)/bin/pip install -U setuptools wheel twine pytest coverage
$(VENV)/bin/pip install -U setuptools wheel twine pytest coverage flake8
$(VENV)/bin/pip install -U sphinx sphinx-intl transifex-client
touch $(VENV)/.installed

Expand Down Expand Up @@ -58,6 +58,9 @@ tx:
test: venv
. $(VENV)/bin/activate; pytest

lint: venv
. $(VENV)/bin/activate; flake8 bottle.py

clean:
rm -rf $(VENV) build/ dist/ MANIFEST .coverage .name htmlcov 2>/dev/null || true
find . -name '__pycache__' -exec rm -rf {} +
Expand Down