comparison configmix/ini.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 b5ce9a8461bf
children bbe8513ea649
comparison
equal deleted inserted replaced
206:5064e3a2e54a 207:b3b5ed34d180
30 try: 30 try:
31 from ordereddict import OrderedDict as DictImpl 31 from ordereddict import OrderedDict as DictImpl
32 except ImportError: 32 except ImportError:
33 DictImpl = dict 33 DictImpl = dict
34 34
35 from .compat import PY2, u, u2fs 35 from .compat import u, u2fs
36 36
37 37
38 __all__ = ["INIConfigParser", "NoSectionError", "NoOptionError", 38 __all__ = ["INIConfigParser", "NoSectionError", "NoOptionError",
39 "load"] 39 "load"]
40 40
180 else: 180 else:
181 for option in cfg: 181 for option in cfg:
182 value = ini.getx(sect, option) 182 value = ini.getx(sect, option)
183 conf[option] = value 183 conf[option] = value
184 # try to read "<extract>.xxx" sections as tree 184 # try to read "<extract>.xxx" sections as tree
185 for treemarker in [ e + '.' for e in extract ]: 185 for treemarker in [e + '.' for e in extract]:
186 sections = list(ini.sections()) 186 sections = list(ini.sections())
187 sections.sort() 187 sections.sort()
188 for section in sections: 188 for section in sections:
189 cur_cfg = conf 189 cur_cfg = conf
190 if section.startswith(treemarker): 190 if section.startswith(treemarker):