From 7fee3dd59ec1c2c2f79a5179e8739ee2ab8b83ff Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Tue, 3 Nov 2026 20:08:15 -0600 Subject: [PATCH 1/2] SPDX header: copyright, a bare # and the licence on every Python file --- modules/displayif/tools/test_usdl2.py | 2 ++ modules/picotts/py/picotts.py | 1 + 2 files changed, 3 insertions(+) diff --git a/modules/displayif/tools/test_usdl2.py b/modules/displayif/tools/test_usdl2.py index d99d009b..8a5ae700 100644 --- a/modules/displayif/tools/test_usdl2.py +++ b/modules/displayif/tools/test_usdl2.py @@ -1,3 +1,5 @@ +# SPDX-FileCopyrightText: 2026 Brad Barnett +# # SPDX-License-Identifier: MIT """Smoke test for usdl2 (MicroPython unix/windows or CircuitPython unix).""" diff --git a/modules/picotts/py/picotts.py b/modules/picotts/py/picotts.py index 9b26a88c..7ec7abb2 100644 --- a/modules/picotts/py/picotts.py +++ b/modules/picotts/py/picotts.py @@ -1,5 +1,6 @@ # SPDX-FileCopyrightText: 2026 Adafruit Industries # SPDX-FileCopyrightText: 2026 PyDevices +# # SPDX-License-Identifier: MIT """Text to speech on the SVOX Pico engine by SVOX AG (Apache-2.0). From 687c25cd9a1e70794898c35404b1dbfd9240f798 Mon Sep 17 00:00:00 2001 From: Brad Barnett <127794626+bdbarnett@users.noreply.github.com> Date: Tue, 3 Nov 2026 20:08:15 -0600 Subject: [PATCH 2/2] Style check: fail a pull request on the mechanical style rules --- .github/workflows/style.yml | 16 ++++++++++++++++ .style-exclude | 5 +++++ 2 files changed, 21 insertions(+) create mode 100644 .github/workflows/style.yml create mode 100644 .style-exclude diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml new file mode 100644 index 00000000..ab9fc31d --- /dev/null +++ b/.github/workflows/style.yml @@ -0,0 +1,16 @@ +# The mechanical house-style rules: SPDX header, no Sphinx roles in +# docstrings, no link to the .github repo from a page, no README badges or +# status banner. Pull requests check the changed files; a manual run checks +# every file. Paths that aren't ours go in .style-exclude. +name: Style + +on: + pull_request: + workflow_dispatch: + +permissions: + contents: read + +jobs: + style: + uses: PyDevices/.github/.github/workflows/reusable-style-check.yml@publishing-v20 diff --git a/.style-exclude b/.style-exclude new file mode 100644 index 00000000..f40f25d6 --- /dev/null +++ b/.style-exclude @@ -0,0 +1,5 @@ +# Paths the style check skips: code that isn't ours, and generated files. +# One glob per line. + +# MicroPython's own mip installer, kept as upstream wrote it. +lib-overrides/mip/