mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
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:
parent
6a238ef853
commit
45edfc1830
@ -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"
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user