This PR ensures that the _parse_layout() function works as intended. Previously, this function was ill-defined (variable k was referenced before assignment) resulting in at least two unintended behaviours:
Parsing of hierarchical layout.json files with more than 2 levels failed, e.g. when calling dc.retrieve("added_level", "appearance", "colortype", extent = extent) instead of dc.retrieve("appearance", "colortype", extent = extent).
The else-part of the function allowed endless iterations.
Type of change
Select one or more relevant options:
[x] Bug fix (change which fixes a bug reported in a specific issue)
[ ] New feature (change which adds a feature requested in a specific issue)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update (improved documentation for existing functionality in the package)
[ ] Repository update (change related to non-package files or structures in the GitHub repository)
Description
This PR ensures that the
_parse_layout()
function works as intended. Previously, this function was ill-defined (variable k was referenced before assignment) resulting in at least two unintended behaviours:dc.retrieve("added_level", "appearance", "colortype", extent = extent)
instead ofdc.retrieve("appearance", "colortype", extent = extent)
.Type of change
Select one or more relevant options:
Checklist: