31 |
31 |
32 |
32 |
33 def _list2string(value): |
33 def _list2string(value): |
34 """ |
34 """ |
35 Function to convert a list value to a setup.cfg string. |
35 Function to convert a list value to a setup.cfg string. |
36 |
36 |
37 @param value list value to be converted |
37 @param value list value to be converted |
38 @type list |
38 @type list |
39 @return setup.cfg string |
39 @return setup.cfg string |
40 @rtype str |
40 @rtype str |
41 """ |
41 """ |
42 if value: |
42 if value: |
43 return "\n{0}".format("\n".join(sorted(filter(None, value)))) |
43 return "\n{0}".format("\n".join(sorted(filter(None, value)))) |
44 |
44 |
45 return "" |
45 return "" |
46 |
46 |
47 |
47 |
48 def _dict2list(value): |
48 def _dict2list(value): |
49 """ |
49 """ |
50 Function to convert a dict value to a setup.cfg list string. |
50 Function to convert a dict value to a setup.cfg list string. |
51 |
51 |
52 @param value dict value to be converted |
52 @param value dict value to be converted |
53 @type dict |
53 @type dict |
54 @yield setup.cfg string |
54 @yield setup.cfg string |
55 @ytype str |
55 @ytype str |
56 """ |
56 """ |
71 |
71 |
72 |
72 |
73 def toString(value): |
73 def toString(value): |
74 """ |
74 """ |
75 Function to convert a value to a setup.cfg string. |
75 Function to convert a value to a setup.cfg string. |
76 |
76 |
77 @param value value to be converted |
77 @param value value to be converted |
78 @type bool, list, set, tuple or dict |
78 @type bool, list, set, tuple or dict |
79 @return setup.cfg string |
79 @return setup.cfg string |
80 @rtype str |
80 @rtype str |
81 """ |
81 """ |