From a1fd1537bdec7bed015f347834f603aba5a79408 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 24 Apr 2014 22:59:01 +0200 Subject: [PATCH] Remove the possibility to pass bindings to KeyParser init --- qutebrowser/keyinput/keyparser.py | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/qutebrowser/keyinput/keyparser.py b/qutebrowser/keyinput/keyparser.py index a70d39a68..8029636f4 100644 --- a/qutebrowser/keyinput/keyparser.py +++ b/qutebrowser/keyinput/keyparser.py @@ -65,8 +65,8 @@ class KeyParser(QObject): MATCH_AMBIGUOUS = 2 MATCH_NONE = 3 - def __init__(self, parent=None, bindings=None, special_bindings=None, - supports_count=None, supports_chains=False): + def __init__(self, parent=None, supports_count=None, + supports_chains=False): super().__init__(parent) self._timer = None self._confsectname = None @@ -75,14 +75,8 @@ class KeyParser(QObject): supports_count = supports_chains self._supports_count = supports_count self._supports_chains = supports_chains - self.special_bindings = ({} if special_bindings is None - else special_bindings) - if bindings is None: - self.bindings = {} - elif supports_chains: - self.bindsings = bindings - else: - raise ValueError("bindings given with supports_chains=False!") + self.bindings = {} + self.special_bindings = {} def _normalize_keystr(self, keystr): """Normalize a keystring like Ctrl-Q to a keystring like Ctrl+Q. @@ -348,8 +342,7 @@ class CommandKeyParser(KeyParser): def __init__(self, parent=None, supports_count=None, supports_chains=False): - super().__init__(parent, supports_count=supports_count, - supports_chains=supports_chains) + super().__init__(parent, supports_count, supports_chains) self.commandparser = CommandParser() def _run_or_fill(self, cmdstr, count=None, ignore_exc=True):