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, locally-disabled,
too-many-ancestors, too-many-ancestors,
too-few-public-methods, too-few-public-methods,
too-many-public-methods too-many-public-methods,
cyclic-import
[BASIC] [BASIC]
module-rgx=[a-z_]*$ module-rgx=[a-z_]*$

View File

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

View File

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