Skip to content

Commit

Permalink
prepare for callable data-attributes, bluedynamics/yafowil.plone#26, …
Browse files Browse the repository at this point in the history
…this commit needs bf84c53e5e3ace6d824a98fe4b4c3a1a19a5369f
  • Loading branch information
2silver committed Jun 12, 2019
1 parent 5e97d89 commit 290e6cf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/yafowil/yaml/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,15 @@ def create_tree(self, data):
def call_factory(defs):
props = dict()
for k, v in defs.get('props', dict()).items():
props[k] = self.parse_definition_value(v)
if isinstance(v, dict):
dict_attrs = list()
for vk, vv in v.items():
val = self.parse_definition_value(vv)
part = [vk, val]
dict_attrs.append(part)
props[k] = dict_attrs
else:
props[k] = self.parse_definition_value(v)
custom = dict()
for custom_key, custom_value in defs.get('custom', dict()).items():
custom_props = list()
Expand Down

0 comments on commit 290e6cf

Please sign in to comment.