summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <git@the-compiler.org>2018-03-12 08:51:08 +0100
committerFlorian Bruhin <git@the-compiler.org>2018-03-12 09:27:18 +0100
commite5bcf99295c7eebc31d8e27ac71ce3a0edf3407b (patch)
treece26a571c2ce291d0062d2704798fb5c8ba393d2
parent2e87539b44630843a06d5312bcbd3dd95edcaaf7 (diff)
downloadqutebrowser-e5bcf99295c7eebc31d8e27ac71ce3a0edf3407b.tar.gz
qutebrowser-e5bcf99295c7eebc31d8e27ac71ce3a0edf3407b.zip
Fix lint
(cherry picked from commit 8c5b7bcd0395f113383a730752b766636c50f776)
-rw-r--r--qutebrowser/config/configtypes.py1
-rw-r--r--tests/unit/config/test_configtypes.py7
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: