From c8795a21a6fe479de63e8fb07e2fe6c23178a5ce Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 18 Apr 2014 11:01:02 +0200 Subject: [PATCH] Revert "Make it possible to not typecheck values in setv." This reverts commit 152bcae6181501bfd12279779398347eee506094. --- qutebrowser/config/sections.py | 6 +++--- qutebrowser/config/value.py | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/qutebrowser/config/sections.py b/qutebrowser/config/sections.py index f1ae0b681..3a79e42a4 100644 --- a/qutebrowser/config/sections.py +++ b/qutebrowser/config/sections.py @@ -68,7 +68,7 @@ class Section: """Get value keys.""" return self.values.keys() - def setv(self, layer, key, value, interpolated=None): + def setv(self, layer, key, value, interpolated): """Set the value on a layer. Args: @@ -111,7 +111,7 @@ class KeyValue(Section): self.values[k] = v self.descriptions[k] = desc - def setv(self, layer, key, value, interpolated=None): + def setv(self, layer, key, value, interpolated): self.values[key].setv(layer, value, interpolated) def dump_userconfig(self): @@ -165,7 +165,7 @@ class ValueList(Section): self.values = ChainMap(self.layers['temp'], self.layers['conf'], self.layers['default']) - def setv(self, layer, key, value, interpolated=None): + def setv(self, layer, key, value, interpolated): self.keytype().validate(key) if key in self.layers[layer]: self.layers[layer][key].setv(layer, value, interpolated) diff --git a/qutebrowser/config/value.py b/qutebrowser/config/value.py index 11957ecf7..5a12177c5 100644 --- a/qutebrowser/config/value.py +++ b/qutebrowser/config/value.py @@ -90,7 +90,7 @@ class SettingValue: v = self.value return self.typ.transform(v) - def setv(self, layer, value, interpolated=None): + def setv(self, layer, value, interpolated): """Set the value on a layer. Args: @@ -98,8 +98,6 @@ class SettingValue: ValueLayers dict. value: The value to set. interpolated: The interpolated value, for typechecking. - If None, no checks get performed. """ - if interpolated is not None: - self.typ.validate(interpolated) + self.typ.validate(interpolated) self._values[layer] = value