diff --git a/qutebrowser/config/config.py b/qutebrowser/config/config.py index d98119ea5..49226ac36 100644 --- a/qutebrowser/config/config.py +++ b/qutebrowser/config/config.py @@ -182,9 +182,10 @@ class Config: else: if raw: return val.value - newval = self._interpolation.before_get( - self, section, option, val.value, - {key: val.value for key, val in self.config[section].values.items()}) + mapping = {key: val.value + for key, val in self.config[section].values.items()} + newval = self._interpolation.before_get(self, section, option, + val.value, mapping) logging.debug("interpolated val: {}".format(newval)) newval = val.typ.transform(newval) return newval @@ -254,8 +255,11 @@ class ReadWriteConfigParser(ReadConfigParser): class SectionProxy(configparser.SectionProxy): + """A proxy for a single section from a parser.""" + # pylint: disable=redefined-builtin + def __getitem__(self, key): return self._parser.get(self._name, key) diff --git a/qutebrowser/widgets/completion.py b/qutebrowser/widgets/completion.py index f45971adc..22263156b 100644 --- a/qutebrowser/widgets/completion.py +++ b/qutebrowser/widgets/completion.py @@ -184,7 +184,7 @@ class CompletionView(QTreeView): model: An index into self._completion_models. """ - self._lastmidel = self._model + self._lastmodel = self._model m = self._completion_models[model] logging.debug("Setting model to {}".format(m)) self.setModel(m)