From 4435ef928796fa744be5452924a103bb2e58ee8e Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 3 Dec 2021 11:58:41 +0100 Subject: pylint: Enable else-if-used --- qutebrowser/browser/hints.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'qutebrowser/browser/hints.py') diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 6ac44adbc..64062bbc6 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -596,6 +596,7 @@ class HintManager(QObject): "'args' is required with target userscript/spawn/run/" "fill.") else: + # pylint: disable=else-if-used if args: raise cmdutils.CommandError( "'args' is only allowed with target userscript/spawn.") @@ -870,12 +871,11 @@ class HintManager(QObject): label.update_text(matched, rest) # Show label again if it was hidden before label.show() - else: + elif (not self._context.rapid or + config.val.hints.hide_unmatched_rapid_hints): # element doesn't match anymore -> hide it, unless in rapid # mode and hide_unmatched_rapid_hints is false (see #1799) - if (not self._context.rapid or - config.val.hints.hide_unmatched_rapid_hints): - label.hide() + label.hide() except webelem.Error: pass self._handle_auto_follow(keystr=keystr) -- cgit v1.2.3-54-g00ecf