Skip to content

Commit 0f6e367

Browse files
add flake8 configuration and PyLint workflow for code quality checks
1 parent 6273f66 commit 0f6e367

2 files changed

Lines changed: 42 additions & 0 deletions

File tree

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
max-line-length = 88
3+
extend-ignore = E501
4+
exclude = .venv, frontend
5+
ignore = E203, W503, G004, G200

.github/workflows/pylint.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: PyLint
2+
3+
on:
4+
push:
5+
paths:
6+
- 'content-gen/src/backend/**/*.py'
7+
- 'content-gen/src/backend/requirements*.txt'
8+
- '.flake8'
9+
- '.github/workflows/pylint.yml'
10+
11+
permissions:
12+
contents: read
13+
actions: read
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
python-version: ["3.11"]
21+
steps:
22+
- uses: actions/checkout@v6
23+
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v6
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -r content-gen/src/backend/requirements.txt
33+
pip install flake8 # Ensure flake8 is installed explicitly
34+
35+
- name: Run flake8 and pylint
36+
run: |
37+
flake8 --config=.flake8 content-gen/src/backend # Specify the directory to lint

0 commit comments

Comments
 (0)