Skip to content

fix(dashboard): replace backslash in f-string expression - closes #74#76

Merged
Wolfvin merged 1 commit into
mainfrom
fix/74-dashboard-f-string-backslash
Jun 28, 2026
Merged

fix(dashboard): replace backslash in f-string expression - closes #74#76
Wolfvin merged 1 commit into
mainfrom
fix/74-dashboard-f-string-backslash

Conversation

@Wolfvin

@Wolfvin Wolfvin commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary

Hotfix for P0 issue #74. Line 655 of dashboard_engine.py used escaped double-quotes inside an f-string expression part. Python 3.11 and earlier disallow backslashes in f-string expression parts (Python 3.12 PEP 701 relaxed this rule).

This caused dashboard.py to fail import on Python 3.11, silently removing the dashboard command from the registry (caught by auto-import except block - see issue #39).

Root cause

Line 655 before fix used backslash-escaped double-quotes inside the f-string expression braces. Python 3.11 rejects backslashes in f-string expression parts.

Fix

Use single-quote triple-quoted string inside the double-quote triple-quoted f-string body. Avoids both the backslash and the delimiter conflict. HTML output is identical.

Verification

  • Python 3.11.15: import dashboard_engine succeeds (was SyntaxError before)
  • Python 3.12.13: import dashboard_engine succeeds (was already working)
  • HTML output: identical (only the Python string representation changed, not the rendered HTML)

Impact

  1. Unblocks CI quality-gate (3.11) for all PRs (fix: consolidate _default_db_path to utils.py — closes #40 #71, feat: rule-validate + rule-test commands — closes #51 #72, etc.)
  2. dashboard command reappears in codelens --help on Python 3.11
  3. Python 3.11 users can use codelens dashboard again

Files

  • scripts/dashboard_engine.py (1 line changed)

Related

Line 655 of dashboard_engine.py used escaped double-quotes (\") inside
an f-string expression part {expr}. Python 3.11 and earlier disallow
backslashes in f-string expression parts (Python 3.12 PEP 701 relaxed
this rule). This caused dashboard.py to fail import on Python 3.11,
silently removing the dashboard command from the registry (caught by
auto-import except block — see issue #39).

Fix: use single-quote triple-quoted string inside the expression to
avoid the backslash entirely. The HTML output is identical.

Verified:
- Python 3.11.15: dashboard_engine imports without error
- Python 3.12.13: dashboard_engine imports without error (was already working)
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Wolfvin Wolfvin merged commit c918b24 into main Jun 28, 2026
1 of 6 checks passed
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG-P0] dashboard_engine.py:655 f-string backslash breaks dashboard command on Python 3.11 (CI runtime)

1 participant