From 7b2961f23e9be9b075dac818013e8b3af4a1ab54 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 12 May 2014 15:58:09 +0200 Subject: [PATCH] Fix some backslash-quotes --- qutebrowser/browser/curcommand.py | 2 +- qutebrowser/browser/hints.py | 4 ++-- qutebrowser/config/_conftypes.py | 2 +- qutebrowser/config/configdata.py | 16 ++++++++-------- qutebrowser/keyinput/_basekeyparser.py | 14 ++++++-------- qutebrowser/widgets/crash.py | 4 ++-- 6 files changed, 20 insertions(+), 22 deletions(-) diff --git a/qutebrowser/browser/curcommand.py b/qutebrowser/browser/curcommand.py index f639d1c18..9b30ef128 100644 --- a/qutebrowser/browser/curcommand.py +++ b/qutebrowser/browser/curcommand.py @@ -467,7 +467,7 @@ class CurCommandDispatcher(QObject): editor = config.get('general', 'editor') executable = editor[0] args = [arg.replace('{}', filename) for arg in editor[1:]] - logging.debug("Calling \"{}\" with args {}".format(executable, args)) + logging.debug("Calling '{}' with args {}".format(executable, args)) proc.start(executable, args) def _editor_cleanup(self, oshandle, filename): diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index a9df0712c..1be6a1beb 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -248,8 +248,8 @@ class HintManager(QObject): # e.g. parse (-webkit-)border-radius correctly and click text fields at # the bottom right, and everything else on the top left or so. pos = webelem.rect_on_view(elem).center() - logging.debug("Clicking on \"{}\" at {}/{}".format( - elem.toPlainText(), pos.x(), pos.y())) + logging.debug("Clicking on '{}' at {}/{}".format(elem.toPlainText(), + pos.x(), pos.y())) events = [ QMouseEvent(QEvent.MouseMove, pos, Qt.NoButton, Qt.NoButton, Qt.NoModifier), diff --git a/qutebrowser/config/_conftypes.py b/qutebrowser/config/_conftypes.py index 0b64c2310..8de77afaa 100644 --- a/qutebrowser/config/_conftypes.py +++ b/qutebrowser/config/_conftypes.py @@ -176,7 +176,7 @@ class String(BaseType): if self.forbidden is not None and any(c in value for c in self.forbidden): raise ValidationError(value, "may not contain the chars " - "\"{}\"".format(self.forbidden)) + "'{}'".format(self.forbidden)) if self.minlen is not None and len(value) < self.minlen: raise ValidationError(value, "must be at least {} chars " "long!".format(self.minlen)) diff --git a/qutebrowser/config/configdata.py b/qutebrowser/config/configdata.py index a5240480a..d5d48579a 100644 --- a/qutebrowser/config/configdata.py +++ b/qutebrowser/config/configdata.py @@ -77,8 +77,8 @@ SECTION_DESC = { "The searchengine named DEFAULT is used when general.auto-search " "is true and something else than an URL was entered to be opened. " "Other search engines can be used via the bang-syntax, e.g. " - "\"qutebrowser !google\". The string \"{}\" will be replaced by the " - "search term, use \"{{\" and \"}}\" for literal {/} signs."), + '"qutebrowser !google". The string "{}" will be replaced by the ' + 'search term, use "{{" and "}}" for literal {/} signs.'), 'keybind': ( "Bindings from a key(chain) to a command.\n" "For special keys (can't be part of a keychain), enclose them in " @@ -90,8 +90,8 @@ SECTION_DESC = { " Shift: Shift\n" "For simple keys (no <>-signs), a capital letter means the key is " "pressed with Shift. For special keys (with <>-signs), you need " - "to explicitely add \"Shift-\" to match a key pressed with shift. " - "You can bind multiple commands by separating them with \";;\"."), + 'to explicitely add "Shift-" to match a key pressed with shift. ' + 'You can bind multiple commands by separating them with ";;".'), 'keybind.insert': ( "Keybindings for insert mode.\n" "Since normal keypresses are passed through, only special keys are " @@ -136,11 +136,11 @@ SECTION_DESC = { " - rgb(r, g, b) / rgba(r, g, b, a) (values 0-255 or " "percentages)\n" " - hsv(h, s, v) / hsva(h, s, v, a) (values 0-255, hue 0-359)\n" - " - A gradient as explained at [2] under \"Gradient\"\n" + ' - A gradient as explained at [2] under "Gradient"\n' " [1] http://www.w3.org/TR/SVG/types.html#ColorKeywords\n" " [2] http://qt-project.org/doc/qt-4.8/stylesheet-reference.html" "#list-of-property-types\n" - "The \"hints.*\" values are a special case as they're real CSS " + 'The "hints.*" values are a special case as they\'re real CSS ' "colors, not Qt-CSS colors. There, for a gradient, you need to use " "-webkit-gradient, see [3].\n" " [3] https://www.webkit.org/blog/175/introducing-css-gradients/"), @@ -150,8 +150,8 @@ SECTION_DESC = { " Weight: normal, bold, 100..900\n" " Size: Number + px/pt\n" "Note: The font for hints is a true CSS font, not a Qt-CSS one, " - "because of that, a general \"Monospace\" family is enough and we " - "don't use \"${_monospace}\" there."), + 'because of that, a general "Monospace" family is enough and we ' + 'don\'t use "${_monospace}" there.'), } diff --git a/qutebrowser/keyinput/_basekeyparser.py b/qutebrowser/keyinput/_basekeyparser.py index 80fbaa2e8..cd3d38e7f 100644 --- a/qutebrowser/keyinput/_basekeyparser.py +++ b/qutebrowser/keyinput/_basekeyparser.py @@ -191,19 +191,17 @@ class BaseKeyParser(QObject): match, binding = self._match_key(cmd_input) if match == self.Match.definitive: - logging.debug("Definitive match for " - "\"{}\".".format(self._keystring)) + logging.debug("Definitive match for '{}'.".format(self._keystring)) self._keystring = '' self.execute(binding, self.Type.chain, count) elif match == self.Match.ambiguous: - logging.debug("Ambigious match for " - "\"{}\".".format(self._keystring)) + logging.debug("Ambigious match for '{}'.".format(self._keystring)) self._handle_ambiguous_match(binding, count) elif match == self.Match.partial: - logging.debug("No match for \"{}\" (added {})".format( + logging.debug("No match for '{}' (added {})".format( self._keystring, txt)) elif match == self.Match.none: - logging.debug("Giving up with \"{}\", no matches".format( + logging.debug("Giving up with '{}', no matches".format( self._keystring)) self._keystring = '' return False @@ -262,7 +260,7 @@ class BaseKeyParser(QObject): binding: The command-string to execute. count: The count to pass. """ - logging.debug("Ambiguous match for \"{}\"".format(self._keystring)) + logging.debug("Ambiguous match for '{}'".format(self._keystring)) time = config.get('input', 'timeout') if time == 0: # execute immediately @@ -342,7 +340,7 @@ class BaseKeyParser(QObject): self.bindings[key] = cmd else: logging.warn( - "Ignoring keychain \"{}\" in section \"{}\" because " + "Ignoring keychain '{}' in section '{}' because " "keychains are not supported there.".format(key, sectname)) def execute(self, cmdstr, keytype, count=None): diff --git a/qutebrowser/widgets/crash.py b/qutebrowser/widgets/crash.py index cb1c05689..608755558 100644 --- a/qutebrowser/widgets/crash.py +++ b/qutebrowser/widgets/crash.py @@ -67,8 +67,8 @@ class CrashDialog(QDialog): "then submit it to " "crash@qutebrowser.org or click 'pastebin'.

") if pages: - text += ("You can click \"Restore tabs\" to attempt to reopen " - "your open tabs.") + text += ("You can click 'Restore tabs' to attempt to reopen your " + "open tabs.") self._lbl.setText(text) self._lbl.setWordWrap(True) self._vbox.addWidget(self._lbl)