Total Complexity | 2 |
Total Lines | 14 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | #!/usr/bin/env python |
||
9 | class ConfigDict(object): |
||
10 | def __init__(self, d): |
||
11 | super(ConfigDict, self).__init__() |
||
12 | self._conf = normalize_or_die(d) |
||
13 | |||
14 | def __call__(self, fixed=None, preset=None, fallback=None): |
||
15 | result = dogmatize(fixed or {}) |
||
16 | result.update(preset) |
||
17 | result.update(self._conf) |
||
18 | added = result.revelation() |
||
19 | config_summary = ConfigSummary(added, result.modified, |
||
20 | result.typechanges) |
||
21 | config_summary.update(undogmatize(result)) |
||
22 | return config_summary |
||
23 |