Mercurial > hgrepos > Python > libs > ConfigMix
diff configmix/config.py @ 207:b3b5ed34d180
Handle most flake8 errors and warnings.
NOTE: E265 "block comment should start with '# ' ist not yet handled.
We would need to adjust our Python style.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 05 May 2019 18:29:47 +0200 |
| parents | 2e66178a09d8 |
| children | bbe8513ea649 |
line wrap: on
line diff
--- a/configmix/config.py Sun May 05 16:53:13 2019 +0200 +++ b/configmix/config.py Sun May 05 18:29:47 2019 +0200 @@ -114,7 +114,7 @@ s = self.getvar_s(varname, default) if isinstance(s, self._TEXTTYPE): sl = s.strip().lower() - if not sl in self._BOOL_CVT: + if sl not in self._BOOL_CVT: raise ValueError("Not a boolean: %r" % s) return self._BOOL_CVT[sl] else: @@ -161,7 +161,9 @@ for p in parts[1:]: v = v[p] except TypeError: - raise KeyError("Configuration variable %r not found (missing intermediate keys?)" % key) + raise KeyError( + "Configuration variable %r not found" + "(missing intermediate keys?)" % key) except KeyError: if default is _MARKER: raise KeyError("Configuration variable %r not found" % key)
