From aced51132c166378668e710400e6496f94e72097 Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Thu, 20 Mar 2025 21:33:40 +0100 Subject: [PATCH] CI: ruff: use 0.11.0 (Cannot use star annotation) Ruff 0.11.1 is incorrectly printing the following types of errors: pmb/helpers/logging.py:169:34: SyntaxError: Cannot use star annotation on Python 3.10 (syntax was added in Python 3.11) | 169 | def critical(msg: object, *args: str, **kwargs: Any) -> None: | ^^^ 170 | logging.critical(msg, *args, **kwargs) | But the code works fine in Python 3.10 (see pytest-python3.10 CI job). This is a known upstream bug, pin to the previous version until it is fixed. Related: https://github.com/astral-sh/ruff/issues/16874 Part-of: https://gitlab.postmarketos.org/postmarketOS/pmbootstrap/-/merge_requests/2578 --- .ci/ruff.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.ci/ruff.sh b/.ci/ruff.sh index 2482b6f8..61f29bb6 100755 --- a/.ci/ruff.sh +++ b/.ci/ruff.sh @@ -5,7 +5,9 @@ if [ "$(id -u)" = 0 ]; then set -x apk -q add py3-pip - pip install --break-system-packages --no-warn-script-location ruff + # pin to ruff 0.11.0 until this is fixed: + # https://github.com/astral-sh/ruff/issues/16874 + pip install --break-system-packages --no-warn-script-location ruff==0.11.0 exec su "${TESTUSER:-build}" -c "sh -e $0" fi