Skip to content

Commit c44974d

Browse files
author
Bradley A. Thornton
committed
Remove test formatter
1 parent 3748cc8 commit c44974d

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

roles/resource_module/filter_plugins/to_argspec.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -40,29 +40,6 @@ def dive(obj, result):
4040
result[k]['options'] = dict()
4141
dive(suboptions, result[k]['options'])
4242

43-
def pretty(value, htchar='\t', lfchar='\n', indent=0):
44-
nlch = lfchar + htchar * (indent + 1)
45-
if type(value) is dict:
46-
items = [
47-
nlch + repr(key) + ': ' + pretty(value[key], htchar, lfchar, indent + 1)
48-
for key in value
49-
]
50-
return '{%s}' % (','.join(items) + lfchar + htchar * indent)
51-
elif type(value) is list:
52-
items = [
53-
nlch + pretty(item, htchar, lfchar, indent + 1)
54-
for item in value
55-
]
56-
return '[%s]' % (','.join(items) + lfchar + htchar * indent)
57-
elif type(value) is tuple:
58-
items = [
59-
nlch + pretty(item, htchar, lfchar, indent + 1)
60-
for item in value
61-
]
62-
return '(%s)' % (','.join(items) + lfchar + htchar * indent)
63-
else:
64-
return repr(value)
65-
6643
def to_argspec(spec):
6744
if 'DOCUMENTATION' not in spec:
6845
raise AnsibleFilterError("missing required element 'DOCUMENTATION'"

0 commit comments

Comments
 (0)