Fix problems reported by pylint

This commit is contained in:
Jakub Klinkovský 2016-02-05 17:13:14 +01:00 committed by Florian Bruhin
parent 1b32444256
commit de66b68b75

View File

@ -725,7 +725,7 @@ class HintManager(QObject):
keyparser.update_bindings(strings, preserve_filter=True)
def _filter_matches(self, filterstr, elemstr):
"""Returns True if `filterstr` matches `elemstr`."""
"""Return True if `filterstr` matches `elemstr`."""
# Empty string and None always match
if not filterstr:
return True
@ -899,10 +899,10 @@ class HintManager(QObject):
"""Filter displayed hints according to a text.
Args:
filterstr: The string to filter with, or None to use the filter from
previous call (saved in `self._filterstr`). If `filterstr`
is an empty string or if both `filterstr` and
`self._filterstr` are None, all hints are shown.
filterstr: The string to filter with, or None to use the filter
from previous call (saved in `self._filterstr`). If
`filterstr` is an empty string or if both `filterstr`
and `self._filterstr` are None, all hints are shown.
"""
if filterstr is None:
filterstr = self._filterstr
@ -932,7 +932,8 @@ class HintManager(QObject):
pass
if not elems:
# Whoops, filtered all hints
modeman.leave(self._win_id, usertypes.KeyMode.hint, 'all filtered')
modeman.leave(self._win_id, usertypes.KeyMode.hint,
'all filtered')
return
self._update_strings(elems)
visible = self._context.elems
@ -946,7 +947,8 @@ class HintManager(QObject):
pass
if not visible:
# Whoops, filtered all hints
modeman.leave(self._win_id, usertypes.KeyMode.hint, 'all filtered')
modeman.leave(self._win_id, usertypes.KeyMode.hint,
'all filtered')
return
if (len(visible) == 1 and