Fix checks and spellings

This commit is contained in:
Florian Bruhin 2014-04-07 17:20:14 +02:00
parent 50740b2828
commit 361dc7d037
2 changed files with 8 additions and 4 deletions

View File

@ -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)

View File

@ -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)