(config, except_keys=('bin_conf'))
| 255 | |
| 256 | |
| 257 | def flatten(config, except_keys=('bin_conf')): |
| 258 | def recurse(inp): |
| 259 | if isinstance(inp, dict): |
| 260 | for key, value in inp.items(): |
| 261 | if key in except_keys: |
| 262 | yield (key, value) |
| 263 | if isinstance(value, dict): |
| 264 | yield from recurse(value) |
| 265 | else: |
| 266 | yield (key, value) |
| 267 | |
| 268 | return dict(list(recurse(config))) |
| 269 | |
| 270 | |
| 271 | def split_combined_args(kwargs): |
no test coverage detected