Add CI lint checks for Python code

Add a lint job to the Launchpad CI pipeline that runs mypy, black, and
flake8 on the new Python code (gen-iso-ids, isobuild, isobuilder).
This commit is contained in:
michael.hudson@canonical.com 2026-01-14 16:55:57 +13:00
parent b3fdc4e615
commit ce809612c4
No known key found for this signature in database
GPG Key ID: 80E627A0AB757E23
2 changed files with 23 additions and 0 deletions

12
.launchpad.yaml Normal file
View File

@ -0,0 +1,12 @@
pipeline:
- [lint]
jobs:
lint:
series: noble
architectures: amd64
packages:
- black
- mypy
- python3-flake8
run: ./check-lint

11
check-lint Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
set -eux
export MYPYPATH=live-build
mypy live-build/isobuilder live-build/isobuild
mypy live-build/gen-iso-ids
black --check live-build/isobuilder live-build/isobuild live-build/gen-iso-ids
python3 -m flake8 --max-line-length 88 --ignore E203 live-build/isobuilder live-build/isobuild live-build/gen-iso-ids