From e5bcf99295c7eebc31d8e27ac71ce3a0edf3407b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 12 Mar 2018 08:51:08 +0100 Subject: Fix lint (cherry picked from commit 8c5b7bcd0395f113383a730752b766636c50f776) --- qutebrowser/config/configtypes.py | 1 + tests/unit/config/test_configtypes.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py index 01bcc5eb0..5dbeb1128 100644 --- a/qutebrowser/config/configtypes.py +++ b/qutebrowser/config/configtypes.py @@ -1651,6 +1651,7 @@ class Key(BaseType): """A name of a key.""" def from_obj(self, value): + """Make sure key sequences are always normalized.""" return str(keyutils.KeySequence.parse(value)) def to_py(self, value): diff --git a/tests/unit/config/test_configtypes.py b/tests/unit/config/test_configtypes.py index 930234425..533932981 100644 --- a/tests/unit/config/test_configtypes.py +++ b/tests/unit/config/test_configtypes.py @@ -537,8 +537,11 @@ class FromObjType(configtypes.BaseType): """Config type to test from_obj for List/Dict.""" - def from_obj(self, obj): - return int(obj) + def from_obj(self, value): + return int(value) + + def to_py(self, value): + return value class TestList: -- cgit v1.2.3-54-g00ecf