From 45edfc18305ab15ac2bb682c8035995f9f102689 Mon Sep 17 00:00:00 2001 From: Jacob Dahl <37091262+dakejahl@users.noreply.github.com> Date: Tue, 17 Mar 2026 21:07:42 -0800 Subject: [PATCH] fix(docs): fix Python 3.8 SyntaxError in generate_msg_docs.py (#26788) Line 319 used nested quotes inside f-strings, a feature only available in Python 3.12+. The CI Docker image (px4-dev-base-focal:2021-08-18) runs Python 3.8, causing the "msg file docs" Jenkins stage to fail on every main build since 6bf73d9d89. Extract the join expressions into local variables to restore compatibility with Python 3.8+. --- Tools/msg/generate_msg_docs.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/msg/generate_msg_docs.py b/Tools/msg/generate_msg_docs.py index 10d93cb67e..95ab3f9af6 100755 --- a/Tools/msg/generate_msg_docs.py +++ b/Tools/msg/generate_msg_docs.py @@ -316,7 +316,9 @@ Param | Units | Range/Enum | Description if val.minValue or val.maxValue: rangeVal = f"[{val.minValue if val.minValue else '-'} : {val.maxValue if val.maxValue else '-' }]" - output+=f"{i} | {", ".join(val.units)}|{', '.join(f"[{e}](#{e})" for e in val.enums)}{rangeVal} | {val.description}\n" + units_str = ", ".join(val.units) + enums_str = ', '.join("[{}](#{})".format(e, e) for e in val.enums) + output+=f"{i} | {units_str}|{enums_str}{rangeVal} | {val.description}\n" else: output+=f"{i} | | | ?\n"