Sorry it took so long, but here's the fix for what I broke in !736 (merged) (implementing https://github.com/python/cpython/pull/490).
I forgot to take the # Differs from CPython: this version handles double-braces on its own.
comment into account, and the final slice instead of the StringBuilder
returned double braces rather than reducing them to a single brace.
This MR should reasonably cleanly fix this.
Alternatively, it is also possible to create an implementation closer to CPython (returning a value from fstring_find_literal
whether another literal part is following: cfr. https://github.com/serhiy-storchaka/cpython/blob/dbdb3a660b9374a87ac98f56578be67ff4dd1bcd/Python/ast.c#L4340-L4347)