mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-07 07:18:27 +01:00
We wrap every data to one of the `Node` object. But, since we were passing `self.data` instead of `self`, it was skipping the conversion and instead was just trying to set data as-is, which would have make our latter assumptions incorrect, as other codebases assume it to be a `Node`. I have added asserts in a few places. Also, I noticed that, on a few test assumptions, when `resolving`, we were not converting values back to it's original form (`CtxDict` -> `dict`, `CtxList` -> `list` and `Value` -> _). So, I have added `node.value` property, as it is a complement of the above fix. This caused a ripple effect for the changes in the API as `foreach` now resolved and changed the data to the original form, which prevents us from tracking the data later in the "field". So, `resolve`/`select` got a real `unwrap` option that should reliably work for all kinds of `Node` objects.