From 0a2940622ceaecba69ff8cb9832c3c1a9aeeac4b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 3 Apr 2022 21:04:33 +0200 Subject: Fix some userscript syntax issues Thanks to (a hacked) pyupgrade --- misc/userscripts/qute-bitwarden | 2 +- misc/userscripts/qute-pass | 2 +- misc/userscripts/readability | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/misc/userscripts/qute-bitwarden b/misc/userscripts/qute-bitwarden index f8629d1dc..30e7c6f2d 100755 --- a/misc/userscripts/qute-bitwarden +++ b/misc/userscripts/qute-bitwarden @@ -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)) diff --git a/misc/userscripts/qute-pass b/misc/userscripts/qute-pass index f410802c8..573644dc4 100755 --- a/misc/userscripts/qute-pass +++ b/misc/userscripts/qute-pass @@ -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)) diff --git a/misc/userscripts/readability b/misc/userscripts/readability index a6a6f2d52..19b687939 100755 --- a/misc/userscripts/readability +++ b/misc/userscripts/readability @@ -10,7 +10,6 @@ # Usage: # :spawn --userscript readability # -from __future__ import absolute_import import codecs, os tmpfile = os.path.join( -- cgit v1.2.3-54-g00ecf