PCN: support quoted strings as property names

This commit is contained in:
miruka 2020-11-14 09:55:54 -04:00
parent 999953bc77
commit 9348df32f7

View File

@ -371,8 +371,13 @@ class Section(MutableMapping):
))
elif isinstance(child, red.AssignmentNode):
if isinstance(child.target, red.NameNode):
name = child.target.value
else:
name = str(child.target.to_python())
instance._set_property(
child.target.value,
name,
child.annotation.dumps() if child.annotation else "",
child.value.dumps(),
)