Skip to content
Snippets Groups Projects
Commit d94128aa authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

simplified from_dict

parent 554248f5
No related branches found
No related tags found
No related merge requests found
__version__ = '2.16.2a5' __version__ = '2.16.2a6'
...@@ -52,10 +52,6 @@ def load_source_from_dict(dct: dict) -> BaseSource: ...@@ -52,10 +52,6 @@ def load_source_from_dict(dct: dict) -> BaseSource:
def to_arg(arg): def to_arg(arg):
if isinstance(arg, dict) and 'type' in arg: if isinstance(arg, dict) and 'type' in arg:
a_type = arg['type'] a_type = arg['type']
if a_type == 'BuildObjectFrom':
key_name = arg['key']
child = load_source_from_dict(arg['child'])
return BuildObjectFrom(key_name, child)
if a_type in EXTRA_TYPES: if a_type in EXTRA_TYPES:
return EXTRA_TYPES[a_type](arg) return EXTRA_TYPES[a_type](arg)
elif a_type in sources.__dict__: elif a_type in sources.__dict__:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment