Skip to content

Commit

Permalink
revert core clean up: cause lost custom config. Need to refract the c…
Browse files Browse the repository at this point in the history
…ore part and check dependent later
  • Loading branch information
atticus-lv committed May 9, 2022
1 parent 594c911 commit 5641bb7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions ops/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,20 @@ def __init__(self, check_use=False, filter=None, io_type="IMPORT"):
for config_list_index, item in enumerate(pref_config):
# config dict
config = dict()
# TODO need to clean up later
for key in item.__annotations__.keys():
value = getattr(item, key)
if key != 'prop_list':
config[key] = value
# prop list
ops_config = dict()
if len(item.prop_list) != 0:
for prop_index, prop_item in enumerate(item.prop_list):
prop, value = prop_item.name, prop_item.value
# skip if the prop is not filled
if prop == '' or value == '': continue
ops_config[prop] = convert_value(value)
config['prop_list'] = ops_config

if io_type == 'IMPORT' and self.is_import_config(config, check_use, filter):
# check config dict
Expand Down

0 comments on commit 5641bb7

Please sign in to comment.