Skip to content

Commit

Permalink
autopep python files
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Nov 23, 2024
1 parent 8483527 commit d89e05f
Show file tree
Hide file tree
Showing 194 changed files with 2,788 additions and 1,754 deletions.
16 changes: 8 additions & 8 deletions automation/cache/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,14 @@ def show(self, i):
if len(new_env) > 0:
print(' New env:')
print(
json.dumps(
new_env,
indent=6,
sort_keys=True).replace(
'{',
'').replace(
'}',
''))
json.dumps(
new_env,
indent=6,
sort_keys=True).replace(
'{',
'').replace(
'}',
''))

new_state = cached_state.get('new_state', {})
if len(new_state) > 0:
Expand Down
24 changes: 12 additions & 12 deletions automation/script/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -3285,43 +3285,43 @@ def _update_variation_meta_with_dynamic_suffix(
for key in variation_meta:
value = variation_meta[key]

if type(value) is list: # deps,pre_deps...
if isinstance(value, list): # deps,pre_deps...
for item in value:
if type(item) is dict:
if isinstance(item, dict):
for item_key in item:
item_value = item[item_key]
if type(
item_value) is dict: # env,default_env inside deps
if isinstance(
item_value, dict): # env,default_env inside deps
for item_key2 in item_value:
item_value[item_key2] = item_value[item_key2].replace(
"#", variation_tag_dynamic_suffix)
elif type(item_value) is list: # names for example
elif isinstance(item_value, list): # names for example
for i, l_item in enumerate(item_value):
if type(l_item) is str:
if isinstance(l_item, str):
item_value[i] = l_item.replace(
"#", variation_tag_dynamic_suffix)
else:
item[item_key] = item[item_key].replace(
"#", variation_tag_dynamic_suffix)

elif type(value) is dict: # add_deps, env, ..
elif isinstance(value, dict): # add_deps, env, ..
for item in value:
item_value = value[item]
if type(item_value) is dict: # deps
if isinstance(item_value, dict): # deps
for item_key in item_value:
item_value2 = item_value[item_key]
if type(
item_value2) is dict: # env,default_env inside deps
if isinstance(
item_value2, dict): # env,default_env inside deps
for item_key2 in item_value2:
item_value2[item_key2] = item_value2[item_key2].replace(
"#", variation_tag_dynamic_suffix)
else:
item_value[item_key] = item_value[item_key].replace(
"#", variation_tag_dynamic_suffix)
else:
if type(item_value) is list: # lists inside env...
if isinstance(item_value, list): # lists inside env...
for i, l_item in enumerate(item_value):
if type(l_item) is str:
if isinstance(l_item, str):
item_value[i] = l_item.replace(
"#", variation_tag_dynamic_suffix)
else:
Expand Down
Loading

0 comments on commit d89e05f

Please sign in to comment.