SIGN IN SIGN UP

Fix: Python 3.11 compatibility issue with f-string backslash in cli_hub/preview.py (#377)

* Fix Python 3.11 compatibility issue in cli_hub/preview.py

* fix(cli-hub): remove backslash from f-string expression for pre-3.12

The prior change swapped the inner double quotes for single quotes, but
pre-3.12 (before PEP 701) prohibits a backslash ANYWHERE in the
expression part of an f-string — the escaped quote left a backslash in
place, so preview.py still raised SyntaxError on Python 3.10/3.11.

Hoist the fallback markup into an empty_message variable so the f-string
expression contains no backslash. This also restores the original
double-quoted HTML (class="artifact-file"); the rendered output is now
byte-for-byte identical to origin/main.

* chore(cli-hub): bump version to 0.4.1

Ships the pre-3.12 f-string fix in preview.py to PyPI. Without a version
bump publish-cli-hub.yml sees 0.4.0 already on PyPI and skips, so users on
Python 3.10/3.11 would keep installing the broken release.

---------

Co-authored-by: yuhao <itsyuhao@icloud.com>
R
Rāna(Bass Ver.) committed
b04a4ebe26fd354334c186d572d817550c045eba
Parent: dc73924
Committed by GitHub <noreply@github.com> on 7/9/2026, 12:03:58 PM