fix: alternate YAML spellings of the version key are invalid, not invisible
Review on this PR: "version": and version : resolve to the same key in YAML, Psych keeping the last value, so an alternate spelling slipped past the duplicate counter. One stale exact key plus one alternate-spelled new value read as a single, stale declaration and the check passed; reproduced before fixing. Per the maintainer's direction, the spelling is restricted rather than parsed, the same answer as the scalar family: a direct-child key that YAML would read as version under any spelling other than exactly version: is an explicit invalid telling the author to rewrite it. The set is closed, so parsing would also be defensible, but the restriction is smaller and keeps the scanner a scanner. Three tests for the coexistence shapes, one for the lone alternate spelling, one pinning that other quoted keys stay untouched. Suite at 34, green on 3.9 and 3.12.
A
AugustusW committed
08022fd9f86e96a4665a0b9eef40540972ff8144
Parent: ded35a7