mirror of
https://github.com/IAmTomShaw/f1-race-replay.git
synced 2026-05-09 08:25:56 +02:00
[PR #171] [MERGED] Fix: f-string bug in Python 3.11 #192
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/f1-race-replay#192
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/IAmTomShaw/f1-race-replay/pull/171
Author: @AmanPathakGitHub
Created: 1/16/2026
Status: ✅ Merged
Merged: 1/18/2026
Merged by: @IAmTomShaw
Base:
main← Head:fstring_bug_fix📝 Commits (1)
b2d4c34fixed fstring bug in python 3.11📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
src/f1_data.py(+1 -1)📄 Description
Problem
A
SyntaxErroroccurs in Python 3.11 due to a f-string that contains unescaped double quotes. This line is valid in Python 3.12+, but crashes in 3.11.Solution
To maintain Python 3.11 compatibility, the f-string should use single quotes inside the braces.
If the project prefers to use double quotes in f-strings, the minimum Python version should be updated to 3.12+ in the README.
This PR applies a single quote fix to make the code run on 3.11.
An alternative solution would be to escape the double quotes inside the f-string, e.g.
{session.get_driver(driver_code)\"FullName\"]}, which also works in 3.11.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.