mirror of
https://gitee.com/openharmony/third_party_pyyaml
synced 2024-11-23 15:30:46 +00:00
The 'N' plain scalar was still recognized as `!!bool
`. Fix it (close #26).
This commit is contained in:
parent
29413ea88e
commit
8f9b8bed40
@ -153,7 +153,7 @@ class Resolver(BaseResolver):
|
||||
|
||||
Resolver.add_implicit_resolver(
|
||||
u'tag:yaml.org,2002:bool',
|
||||
re.compile(ur'''^(?:yes|Yes|YES|n|N|no|No|NO
|
||||
re.compile(ur'''^(?:yes|Yes|YES|no|No|NO
|
||||
|true|True|TRUE|false|False|FALSE
|
||||
|on|On|ON|off|Off|OFF)$''', re.X),
|
||||
list(u'yYnNtTfFoO'))
|
||||
|
@ -3,4 +3,5 @@
|
||||
"answer": False,
|
||||
"logical": True,
|
||||
"option": True,
|
||||
"but": { "y": "is a string", "n": "is a string" },
|
||||
}
|
||||
|
@ -2,3 +2,8 @@ canonical: yes
|
||||
answer: NO
|
||||
logical: True
|
||||
option: on
|
||||
|
||||
|
||||
but:
|
||||
y: is a string
|
||||
n: is a string
|
||||
|
Loading…
Reference in New Issue
Block a user