summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: