14 # list-comma - dangling list or string of comma-separated values |
14 # list-comma - dangling list or string of comma-separated values |
15 # list-semi - dangling list or string of semicolon-separated values |
15 # list-semi - dangling list or string of semicolon-separated values |
16 # bool - True is 1, yes, true |
16 # bool - True is 1, yes, true |
17 # dict - list-comma where keys are separated from values by = |
17 # dict - list-comma where keys are separated from values by = |
18 # |
18 # |
|
19 |
19 |
20 |
20 def _bool2string(value): |
21 def _bool2string(value): |
21 """ |
22 """ |
22 Function to convert a bool value to a setup.cfg string. |
23 Function to convert a bool value to a setup.cfg string. |
23 |
24 |
64 @return setup.cfg string |
67 @return setup.cfg string |
65 @rtype str |
68 @rtype str |
66 """ |
69 """ |
67 return _list2string(list(_dict2list(value))) |
70 return _list2string(list(_dict2list(value))) |
68 |
71 |
|
72 |
69 def toString(value): |
73 def toString(value): |
70 """ |
74 """ |
71 Function to convert a value to a setup.cfg string |
75 Function to convert a value to a setup.cfg string. |
72 |
76 |
73 @param value value to be converted |
77 @param value value to be converted |
74 @type bool, list, set, tuple or dict |
78 @type bool, list, set, tuple or dict |
75 @return setup.cfg string |
79 @return setup.cfg string |
76 @rtype str |
80 @rtype str |