Fix some userscript syntax issues
Thanks to (a hacked) pyupgrade
This commit is contained in:
parent
bd8c940320
commit
0a2940622c
|
|
@ -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))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
# Usage:
|
||||
# :spawn --userscript readability
|
||||
#
|
||||
from __future__ import absolute_import
|
||||
import codecs, os
|
||||
|
||||
tmpfile = os.path.join(
|
||||
|
|
|
|||
Loading…
Reference in New Issue