diff --git a/qutebrowser/commands/cmdutils.py b/qutebrowser/commands/cmdutils.py index 5b2982fb0..8111a1dd4 100644 --- a/qutebrowser/commands/cmdutils.py +++ b/qutebrowser/commands/cmdutils.py @@ -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. diff --git a/qutebrowser/misc/keyhintwidget.py b/qutebrowser/misc/keyhintwidget.py index cfac8ba8e..63b8f017c 100644 --- a/qutebrowser/misc/keyhintwidget.py +++ b/qutebrowser/misc/keyhintwidget.py @@ -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()