Closed mvanderkamp closed 3 years ago
This PR just deals with some pretty minor things in the way the var_view renders variables with long names and/or values.
If you have a really long variable/value combo in the var view and you don't wrap, the value is printed on a subsequent line, e.g.
| | .my_long_named_attribute | | [0, 1, 2, 3, 4, 5]
If you were to wrap the same variable it might be rendered as:
| | .my_long_named_attribute: [0, 1, | | 2, 3, 4, 5]
This PR normalizes the two by making the non-wrapped one look like this: (note the ":" on the first line)
| | .my_long_named_attribute: | | [0, 1, 2, 3, 4, 5]
And the wrapped one look like this: (note the spaces on the second line now come after the prefix)
There's also a tweak to make sure that when not wrapping, we'll only use two lines for a variable if we actually don't have enough space to show it in one.
I did a bit of refactoring to unpack the size tuple earlier, which seems more clear to me, and added documentation.
size
LGTM, thanks!
This PR just deals with some pretty minor things in the way the var_view renders variables with long names and/or values.
If you have a really long variable/value combo in the var view and you don't wrap, the value is printed on a subsequent line, e.g.
If you were to wrap the same variable it might be rendered as:
This PR normalizes the two by making the non-wrapped one look like this: (note the ":" on the first line)
And the wrapped one look like this: (note the spaces on the second line now come after the prefix)
There's also a tweak to make sure that when not wrapping, we'll only use two lines for a variable if we actually don't have enough space to show it in one.