Fix some userscript syntax issues

Thanks to (a hacked) pyupgrade
This commit is contained in:
Florian Bruhin 2022-04-03 21:04:33 +02:00
parent bd8c940320
commit 0a2940622c
3 changed files with 2 additions and 3 deletions

View File

@ -196,7 +196,7 @@ def dmenu(items, invocation, encoding):
def fake_key_raw(text):
for character in text:
# Escape all characters by default, space requires special handling
sequence = '" "' if character == ' ' else '\{}'.format(character)
sequence = '" "' if character == ' ' else r'\{}'.format(character)
qute_command('fake-key {}'.format(sequence))

View File

@ -188,7 +188,7 @@ def dmenu(items, invocation):
def fake_key_raw(text):
for character in text:
# Escape all characters by default, space requires special handling
sequence = '" "' if character == ' ' else '\{}'.format(character)
sequence = '" "' if character == ' ' else r'\{}'.format(character)
qute_command('fake-key {}'.format(sequence))

View File

@ -10,7 +10,6 @@
# Usage:
# :spawn --userscript readability
#
from __future__ import absolute_import
import codecs, os
tmpfile = os.path.join(