Remove dead code
This code is not called/needed anymore with the changes done in the new-config branch.
This commit is contained in:
parent
b185e57406
commit
1fe1cd45f5
@ -86,27 +86,6 @@ class register: # pylint: disable=invalid-name
|
|||||||
self._name = name
|
self._name = name
|
||||||
self._kwargs = kwargs
|
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):
|
def __call__(self, func):
|
||||||
"""Register the command before running the function.
|
"""Register the command before running the function.
|
||||||
|
|
||||||
|
@ -95,11 +95,7 @@ class KeyHintView(QLabel):
|
|||||||
for glob in config.val.keyhint.blacklist)
|
for glob in config.val.keyhint.blacklist)
|
||||||
|
|
||||||
bindings_dict = config.key_instance.get_bindings_for(modename)
|
bindings_dict = config.key_instance.get_bindings_for(modename)
|
||||||
if not bindings_dict:
|
bindings = [(k, v) for (k, v) in sorted(bindings_dict.items())
|
||||||
bindings = []
|
|
||||||
else:
|
|
||||||
bindings = [(k, v) for (k, v)
|
|
||||||
in sorted(bindings_dict.items())
|
|
||||||
if k.startswith(prefix) and
|
if k.startswith(prefix) and
|
||||||
not utils.is_special_key(k) and
|
not utils.is_special_key(k) and
|
||||||
not blacklisted(k)]
|
not blacklisted(k)]
|
||||||
|
Loading…
Reference in New Issue
Block a user