Dynamically updating a view with list content fails.
- Dominant language
- Python
- Stars
- 424
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
With following configuration:
```yaml
---
logging:
console:
modify: yes
level: DEBUG
stagerunner:
stages:
- name: Initialize Run
type: ConfigureStage
- name: Workspace
type: WsbStage
arguments:
name: Configs
...
```
original dump is:
```
logging:
console:
modify: yes
level: DEBUG
stagerunner:
stages:
[{name: Initialize Run, type: ConfigureStage},
{name: Workspace, type: WsbStage, arguments: {name: Configs}}]
```
After dynamically updating values with following code:
```python
dview = config["logging"]["console"]["level"]
dview.set("INFO")
lview = config["stagerunner"]["stages"][0]["name"]
lview.set("newname")
```
Changes the data into this:
```
logging:
console:
modify: yes
level: INFO
stagerunner:
stages:
0:
name: newname
```
The dict update works as expected but the list gets broken.
Reading values from inside of the lists works but not updating.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the issue with the YAML configuration and the config["stagerunner"]["stages"][0]["name"] view update, then compare the resulting structure with the original list. Done means setting the nested list value preserves both stage entries and their list representation, while the existing dictionary update still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100