Remove dead code

This code is not called/needed anymore with the changes done in the new-config
branch.
This commit is contained in:
Florian Bruhin 2017-09-13 12:18:51 +02:00
parent b185e57406
commit 1fe1cd45f5
2 changed files with 4 additions and 29 deletions

View File

@ -86,27 +86,6 @@ class register: # pylint: disable=invalid-name
self._name = name
self._kwargs = kwargs
def _get_name(self, func):
"""Get the name(s) which should be used for the current command.
If the name hasn't been overridden explicitly, the function name is
transformed.
If it has been set, it can either be a string which is
used directly, or an iterable.
Args:
func: The function to get the name of.
Return:
A list of names, with the main name being the first item.
"""
if self._name is None:
return [func.__name__.lower().replace('_', '-')]
else:
assert isinstance(self._name, str)
return self._name
def __call__(self, func):
"""Register the command before running the function.

View File

@ -95,14 +95,10 @@ class KeyHintView(QLabel):
for glob in config.val.keyhint.blacklist)
bindings_dict = config.key_instance.get_bindings_for(modename)
if not bindings_dict:
bindings = []
else:
bindings = [(k, v) for (k, v)
in sorted(bindings_dict.items())
if k.startswith(prefix) and
not utils.is_special_key(k) and
not blacklisted(k)]
bindings = [(k, v) for (k, v) in sorted(bindings_dict.items())
if k.startswith(prefix) and
not utils.is_special_key(k) and
not blacklisted(k)]
if not bindings:
self._show_timer.stop()