mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Remove backslash from f-string expression
This restriction was removed in Python 3.12, but plenty of users still have older versions.
This commit is contained in:
parent
22514b96dc
commit
b308adc3af
1 changed files with 2 additions and 1 deletions
|
@ -141,7 +141,8 @@ class DecompileCtx:
|
||||||
val = truthy(value)
|
val = truthy(value)
|
||||||
self.print("true" if val else "false")
|
self.print("true" if val else "false")
|
||||||
elif type.assignable_to(ArrayType(StringType())):
|
elif type.assignable_to(ArrayType(StringType())):
|
||||||
self.print(f"[{', '.join([escape_quote(x) for x in value.split('\n')])}]")
|
items = ", ".join([escape_quote(x) for x in value.split("\n")])
|
||||||
|
self.print(f"[{items}]")
|
||||||
elif (
|
elif (
|
||||||
type.assignable_to(self.gir.namespaces["Gtk"].lookup_type("Gdk.Pixbuf"))
|
type.assignable_to(self.gir.namespaces["Gtk"].lookup_type("Gdk.Pixbuf"))
|
||||||
or type.assignable_to(self.gir.namespaces["Gtk"].lookup_type("Gdk.Texture"))
|
or type.assignable_to(self.gir.namespaces["Gtk"].lookup_type("Gdk.Texture"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue