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+.
This commit is contained in:
Jacob Dahl 2026-03-17 21:07:42 -08:00 committed by GitHub
parent 6a238ef853
commit 45edfc1830
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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"