add Python syntax check and linting workflow
Some checks failed
Python syntax & lint / syntax-lint (push) Failing after 9s

This commit is contained in:
Space-Banane
2026-04-06 23:01:19 +02:00
parent 75b071c5be
commit e95f915d86
2 changed files with 41 additions and 1 deletions

View File

@@ -0,0 +1,38 @@
name: Python syntax & lint
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
jobs:
syntax-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install flake8
- name: Run Python syntax check
run: |
set -e
files=$(git ls-files '*.py')
if [ -z "$files" ]; then echo "No Python files to check"; exit 0; fi
python -m py_compile $files
- name: Run flake8 lint
run: |
files=$(git ls-files '*.py')
if [ -z "$files" ]; then echo "No Python files to lint"; exit 0; fi
flake8 $files

View File

@@ -94,4 +94,6 @@ python batch.py
- `requirements.txt` — Python dependencies.
## License
- MIT No Attribution — see `MIT-0.txt`.
- MIT No Attribution — see `MIT-0.txt`.
## Made with Claude Sonnet in about 15 Minutes.