From ce809612c4ef6eb849fbc563952fe9aab57960cb Mon Sep 17 00:00:00 2001 From: "michael.hudson@canonical.com" Date: Wed, 14 Jan 2026 16:55:57 +1300 Subject: [PATCH] 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). --- .launchpad.yaml | 12 ++++++++++++ check-lint | 11 +++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .launchpad.yaml create mode 100755 check-lint diff --git a/.launchpad.yaml b/.launchpad.yaml new file mode 100644 index 00000000..199f4d5b --- /dev/null +++ b/.launchpad.yaml @@ -0,0 +1,12 @@ +pipeline: + - [lint] + +jobs: + lint: + series: noble + architectures: amd64 + packages: + - black + - mypy + - python3-flake8 + run: ./check-lint diff --git a/check-lint b/check-lint new file mode 100755 index 00000000..27ee15bf --- /dev/null +++ b/check-lint @@ -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