Skip to content

Commit c8acb24

Browse files
Add flake8 config and GitHub Actions workflow for linting
1 parent 3b5803e commit c8acb24

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length = 88
3+
exclude = .venv,venv,build,dist,*.egg-info,__pycache__

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Python Linter
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v3
10+
11+
- name: Set up Python
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.10'
15+
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install flake8
20+
21+
- name: Run flake8
22+
run: |
23+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
24+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

0 commit comments

Comments
 (0)