Skip to content

Fix nested f-string for Python <3.12 - #4

Open
schmidtwmark wants to merge 1 commit into
viticci:mainfrom
schmidtwmark:main
Open

Fix nested f-string for Python <3.12#4
schmidtwmark wants to merge 1 commit into
viticci:mainfrom
schmidtwmark:main

Conversation

@schmidtwmark

@schmidtwmark schmidtwmark commented Jul 29, 2026

Copy link
Copy Markdown

When I initially ran frames on my Mac with Python 3.8, I saw this error:

  File "/Users/markschmidt/.local/bin/frames", line 2708
    print(f"    {C.dim('Rotated:')} {r['source_dimensions']} {C.dim('→')} {r['dimensions']} {C.dim(f'({r["rotation"]})')}")
                                                                                                            ^
SyntaxError: f-string: unterminated string

This is because there are 3 layers of f-strings, the first using ", the second ', and the last using ". Repeated quotes weren't supported until Python 3.12

This makes sure that frames is compatible with Python 3.8, as described in the README.

Thanks for making an awesome tool!

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.

1 participant