Bug: cli-hub crashes on Python 3.11 with SyntaxError: f-string expression part cannot include a backslash.
Root cause: In cli_hub/preview.py line 723:
f'<div class="trajectory-list">{items_html or "<div class=\\"artifact-file\\">No step timeline entries yet.</div>"}</div>'
Python 3.11 does not allow backslashes inside f-string expression groups {...}. This was relaxed in Python 3.12+ (PEP 701).
Fix: Extract the fallback string to a variable outside the f-string:
_empty_trajectory = '<div class="artifact-file">No step timeline entries yet.</div>'
f'<div class="trajectory-list">{items_html or _empty_trajectory}</div>'
Verified fix passes lint and cli-hub works normally on Python 3.11.15 after the change.
Bug:
cli-hubcrashes on Python 3.11 withSyntaxError: f-string expression part cannot include a backslash.Root cause: In
cli_hub/preview.pyline 723:f'<div class="trajectory-list">{items_html or "<div class=\\"artifact-file\\">No step timeline entries yet.</div>"}</div>'Python 3.11 does not allow backslashes inside f-string expression groups
{...}. This was relaxed in Python 3.12+ (PEP 701).Fix: Extract the fallback string to a variable outside the f-string:
Verified fix passes lint and
cli-hubworks normally on Python 3.11.15 after the change.