Fix/silence checks

This commit is contained in:
Florian Bruhin 2014-04-28 00:05:14 +02:00
parent bfecafd686
commit 0d92e34310
3 changed files with 5 additions and 3 deletions

View File

@ -14,7 +14,8 @@ disable=no-self-use,
locally-disabled,
too-many-ancestors,
too-few-public-methods,
too-many-public-methods
too-many-public-methods,
cyclic-import
[BASIC]
module-rgx=[a-z_]*$

View File

@ -428,7 +428,7 @@ class QuteBrowser(QApplication):
s: The string to evaluate.
"""
try:
r = eval(s)
r = eval(s) # pylint: disable=eval-used
out = repr(r)
except Exception as e: # pylint: disable=broad-except
out = ': '.join([e.__class__.__name__, str(e)])

View File

@ -327,11 +327,11 @@ class HintManager(QObject):
keystr: The keychain string to follow.
force: When True, follow even when auto-follow is false.
"""
# Targets which require a valid link
if not (force or config.get('hints', 'auto-follow')):
self.handle_partial_key(keystr)
self._to_follow = keystr
return
# Targets which require a valid link
require_link = ['yank', 'yank_primary', 'cmd', 'cmd_tab', 'cmd_bgtab']
elem = self._elems[keystr].elem
if self._target in require_link:
@ -358,6 +358,7 @@ class HintManager(QObject):
modeman.leave('hint')
def follow_hint(self):
"""Follow the currently selected hint."""
if not self._to_follow:
message.error("No hint to follow")
self.fire(self._to_follow, force=True)