Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint with flake8
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: 3.10
- name: Install dependencies
run: |
python -m pip install flake8
- name: Lint with flake8
run: |
make lint
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Lint requirements: flake8, autopep8, autoflake
# Run `python -m pip install autopep8 flake8 autoflake` to install them

.PHONY: lint
lint:
flake8 ./ --exclude .venv,*_pb2.py --max-line-length=150 --ignore=F403,F405,F541

.PHONY: format
format:
autopep8 --in-place --aggressive --aggressive --recursive ./ --exclude .venv,*_pb2.py --max-line-length=150
autoflake --in-place --recursive --remove-all-unused-imports --remove-unused-variables ./ --exclude .venv