From 3649a368692c0ebae5626bc6f161d147dea0b948 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 4 Mar 2018 17:37:07 +0100 Subject: [PATCH] KeySequence: Add __le__/__ge__ --- qutebrowser/keyinput/keyutils.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qutebrowser/keyinput/keyutils.py b/qutebrowser/keyinput/keyutils.py index 6dbebfef0..90b6dae96 100644 --- a/qutebrowser/keyinput/keyutils.py +++ b/qutebrowser/keyinput/keyutils.py @@ -318,6 +318,14 @@ class KeySequence: # pylint: disable=protected-access return self._sequences > other._sequences + def __le__(self, other): + # pylint: disable=protected-access + return self._sequences <= other._sequences + + def __ge__(self, other): + # pylint: disable=protected-access + return self._sequences >= other._sequences + def __eq__(self, other): # pylint: disable=protected-access return self._sequences == other._sequences