yaml / pyyaml

Canonical source repository for PyYAML
MIT License
2.54k stars 515 forks source link

bugfix: yaml default mapping value resolver breaks parsing of simple string lists #775

Open tuunit opened 9 months ago

tuunit commented 9 months ago

Description of the bug

When trying to parse a simple yaml list like the following:

mylist:
  - =

An error occurs:

could not determine a constructor for the tag 'tag:yaml.org,2002:value'
  in "<unicode string>", line X, column X

Adding quotes fixes the issues:

mylist:
  - '='

Motivation

The list without quotes is valid YAML and it should therefore be possible to parse it.

Further notes

Related to #89, #635