beetbox / beetbox/confuse

RootView only accepts a single configuration source

Open
#194 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
424
Forks
57
PR merge metrics
No merged PRs in 30d

Description

I just reactivated a project where I used confuse 2.0.1. After updating to confuse 2.2.0, when creating a RootView instance from two SourceYaml instances, only the first one is taken into account. (Windows 11 pro, Python 3.14.2)

_cfg1.yaml_
```yaml
group_1:
item1: item_1.1
group_2:
item1: item_2.1
```
_cfg2.yaml_
```yaml
group_3:
item1: item_3.1
```

```python
import confuse

cfg1_source = confuse.YamlSource("cfg1.yaml")
cfg2_source = confuse.YamlSource("cfg2.yaml")
root_view: confuse.RootView = confuse.RootView([cfg1_source, cfg2_source])

print(root_view.get().items())
```
_Output_
```
dict_items([('group_1', OrderedDict({'item1': 'item_1.1'})), ('group_2', OrderedDict({'item1': 'item_2.1'}))])
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.