fix(dashboard): replace backslash in f-string expression - closes #74#76
Merged
Conversation
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)
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
This was referenced Jun 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Hotfix for P0 issue #74. Line 655 of
dashboard_engine.pyused 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.pyto fail import on Python 3.11, silently removing thedashboardcommand 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
import dashboard_enginesucceeds (was SyntaxError before)import dashboard_enginesucceeds (was already working)Impact
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.)dashboardcommand reappears incodelens --helpon Python 3.11codelens dashboardagainFiles
scripts/dashboard_engine.py(1 line changed)Related