You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the YAML specification, the order of keys in maps like screens is not supposed to be significant.
But it seems to me that yafti relies on the order of the keys in the file to determine the order to display the screens in (subject to the conditions of each screen).
If you want an ordered map, you are supposed to use this syntax (example 2.26 in the YAML 1.2.2 spec):
# Ordered maps are represented as
# A sequence of mappings, with
# each mapping having one key
--- !!omap
- Mark McGwire: 65
- Sammy Sosa: 63
- Ken Griffey: 58
It seems to me that the !!omap type annotation is optional, but the use of lists is not.
The text was updated successfully, but these errors were encountered:
We may be getting lucky based on the implementation of dicts in python since 3.6 which order is preserved by default. This means ordered maps aren't required unless we're reading, parsing, and re-writing the YAML file back to disk. I don't know how pyaml handles !!omap so I'd need to experiment. If it does "the right thing" then prefect we can update the yafti format to support this allowing future implementations of yafti to not rely on Python quirks.
If pyyaml (or ruamel.yaml for that matter) don't treat omaps well I may close this for now and if we ever stray from Python we'll need to rev the yafti.yaml format version. I'm going to assign this to the 1.0 milestone and update based on research if no one else gets to this before me.
According to the YAML specification, the order of keys in maps like
screens
is not supposed to be significant.But it seems to me that yafti relies on the order of the keys in the file to determine the order to display the screens in (subject to the conditions of each screen).
If you want an ordered map, you are supposed to use this syntax (example 2.26 in the YAML 1.2.2 spec):
It seems to me that the
!!omap
type annotation is optional, but the use of lists is not.The text was updated successfully, but these errors were encountered: