Skip to content

Commit

Permalink
Merge pull request #593 from Submandarine/main
Browse files Browse the repository at this point in the history
Fix indentation in all files
  • Loading branch information
arjunsuresh authored Nov 23, 2024
2 parents fc41788 + d8c5217 commit da99bd7
Show file tree
Hide file tree
Showing 190 changed files with 1,802 additions and 1,831 deletions.
6 changes: 3 additions & 3 deletions automation/cache/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test(self, i):
Test automation
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand Down Expand Up @@ -57,7 +57,7 @@ def show(self, i):
Show cache
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand All @@ -77,7 +77,7 @@ def show(self, i):

# Check parsed automation
if 'parsed_automation' not in i:
return {'return':1, 'error':'automation is not specified'}
return {'return':1, 'error':'automation is not specified'}

console = i.get('out') == 'con'

Expand Down
2 changes: 1 addition & 1 deletion automation/cache/module_misc.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
from cmind import utils


############################################################
def copy_to_remote(i):
Expand Down
30 changes: 15 additions & 15 deletions automation/cfg/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test(self, i):
Test automation
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand Down Expand Up @@ -61,7 +61,7 @@ def xset(self, i):
Set keys in configuration
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand Down Expand Up @@ -105,16 +105,16 @@ def check_to_delete(d):
check_to_delete(v)
else:
if k.endswith('-'):
if k[:-1] in d:
del(d[k[:-1]])
del(d[k])
if k[:-1] in d:
del(d[k[:-1]])
del(d[k])
else:
vsl = str(v).lower()
if vsl == 'none': v = None
elif vsl == 'false': v = False
elif vsl == 'true': v = True
vsl = str(v).lower()
if vsl == 'none': v = None
elif vsl == 'false': v = False
elif vsl == 'true': v = True

d[k]=v
d[k]=v

utils.merge_dicts({'dict1':config, 'dict2':new_config, 'append_lists':True, 'append_unique':True})

Expand All @@ -136,7 +136,7 @@ def load(self, i):
Load configuration
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand All @@ -160,7 +160,7 @@ def load(self, i):
def _find_cfg_artifact(self, i):
"""
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand Down Expand Up @@ -188,7 +188,7 @@ def _find_cfg_artifact(self, i):

artifact = i.get('artifact', '')

if artifact == '':
if artifact == '':
ii['artifact'] = 'default'

tags = ii.get('tags', '')
Expand All @@ -200,11 +200,11 @@ def _find_cfg_artifact(self, i):
ii['tags'] = tags

automation = ii['automation']
if automation!='.' and ',' not in automation:
if automation!='.' and ',' not in automation:
ii['automation'] = automation + ',' + self.meta['uid']

# Add placeholder (use common action)

ii['action']='find'
ii['out']=''
ii['common']=True # Avoid recursion - use internal CM add function to add the script artifact
Expand Down
2 changes: 1 addition & 1 deletion automation/challenge/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test(self, i):
Test automation
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand Down
12 changes: 6 additions & 6 deletions automation/contributor/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test(self, i):
Test automation
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand Down Expand Up @@ -57,7 +57,7 @@ def add(self, i):
Add CM script
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand Down Expand Up @@ -97,9 +97,9 @@ def add(self, i):
if r['return']>0: return r
elif r['return']==0 and len(r['list'])>0:
return {'return':1, 'error':'CM artifact with name {} already exists in {}'.format(name, r['list'][0].path)}

meta = i.get('meta',{})

# Prepare meta
org = meta.get('organization','')
if org=='':
Expand Down Expand Up @@ -128,7 +128,7 @@ def add(self, i):
i['action'] = 'add'
i['automation'] = self_automation
i['artifact'] = artifact

i['meta'] = meta

print ('')
Expand All @@ -139,7 +139,7 @@ def add(self, i):
path = r['path']

path2 = os.path.dirname(path)

print ('')
print ('Please go to {}, add your directory to Git, commit and create PR:'.format(path2))
print ('')
Expand Down
2 changes: 1 addition & 1 deletion automation/data/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test(self, i):
Test automation
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand Down
2 changes: 1 addition & 1 deletion automation/docker/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test(self, i):
Test automation
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand Down
2 changes: 1 addition & 1 deletion automation/docs/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test(self, i):
Test automation
Args:
(CM input dict):
(CM input dict):
(out) (str): if 'con', output to console
Expand Down
Loading

0 comments on commit da99bd7

Please sign in to comment.