|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>Plugin_Metrics_Radon.RadonMetrics.MaintainabilityIndexCalculator</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>Plugin_Metrics_Radon.RadonMetrics.MaintainabilityIndexCalculator</h1> |
|
23 <p> |
|
24 Module implementing the maintainability index service. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr><td>None</td></tr> |
|
33 </table> |
|
34 <h3>Functions</h3> |
|
35 <table> |
|
36 <tr> |
|
37 <td><a href="#__maintainabilityIndex">__maintainabilityIndex</a></td> |
|
38 <td>Private function to calculate the maintainability index for one Python file.</td> |
|
39 </tr><tr> |
|
40 <td><a href="#batchMaintainabilityIndex">batchMaintainabilityIndex</a></td> |
|
41 <td>Module function to calculate the maintainability index for a batch of files.</td> |
|
42 </tr><tr> |
|
43 <td><a href="#initBatchService">initBatchService</a></td> |
|
44 <td>Initialize the batch service and return the entry point.</td> |
|
45 </tr><tr> |
|
46 <td><a href="#initService">initService</a></td> |
|
47 <td>Initialize the service and return the entry point.</td> |
|
48 </tr><tr> |
|
49 <td><a href="#maintainabilityIndex">maintainabilityIndex</a></td> |
|
50 <td>Private function to calculate the maintainability index of one file.</td> |
|
51 </tr><tr> |
|
52 <td><a href="#worker">worker</a></td> |
|
53 <td>Module function acting as the parallel worker for the maintainability index calculation.</td> |
|
54 </tr> |
|
55 </table> |
|
56 <hr /><hr /> |
|
57 <a NAME="__maintainabilityIndex" ID="__maintainabilityIndex"></a> |
|
58 <h2>__maintainabilityIndex</h2> |
|
59 <b>__maintainabilityIndex</b>(<i>file, text=""</i>) |
|
60 <p> |
|
61 Private function to calculate the maintainability index for one Python |
|
62 file. |
|
63 </p><dl> |
|
64 <dt><i>file</i> (str)</dt> |
|
65 <dd> |
|
66 source filename |
|
67 </dd><dt><i>text</i> (str)</dt> |
|
68 <dd> |
|
69 source text |
|
70 </dd> |
|
71 </dl><dl> |
|
72 <dt>Returns:</dt> |
|
73 <dd> |
|
74 tuple containing the result dictionary |
|
75 </dd> |
|
76 </dl><dl> |
|
77 <dt>Return Type:</dt> |
|
78 <dd> |
|
79 (tuple of dict) |
|
80 </dd> |
|
81 </dl> |
|
82 <div align="right"><a href="#top">Up</a></div> |
|
83 <hr /><hr /> |
|
84 <a NAME="batchMaintainabilityIndex" ID="batchMaintainabilityIndex"></a> |
|
85 <h2>batchMaintainabilityIndex</h2> |
|
86 <b>batchMaintainabilityIndex</b>(<i>argumentsList, send, fx, cancelled</i>) |
|
87 <p> |
|
88 Module function to calculate the maintainability index for a batch of |
|
89 files. |
|
90 </p><dl> |
|
91 <dt><i>argumentsList</i> (list)</dt> |
|
92 <dd> |
|
93 list of arguments tuples as given for |
|
94 maintainabilityIndex |
|
95 </dd><dt><i>send</i> (function)</dt> |
|
96 <dd> |
|
97 reference to send function |
|
98 </dd><dt><i>fx</i> (str)</dt> |
|
99 <dd> |
|
100 registered service name |
|
101 </dd><dt><i>cancelled</i> (function)</dt> |
|
102 <dd> |
|
103 reference to function checking for a cancellation |
|
104 </dd> |
|
105 </dl> |
|
106 <div align="right"><a href="#top">Up</a></div> |
|
107 <hr /><hr /> |
|
108 <a NAME="initBatchService" ID="initBatchService"></a> |
|
109 <h2>initBatchService</h2> |
|
110 <b>initBatchService</b>(<i></i>) |
|
111 <p> |
|
112 Initialize the batch service and return the entry point. |
|
113 </p><dl> |
|
114 <dt>Returns:</dt> |
|
115 <dd> |
|
116 the entry point for the background client (function) |
|
117 </dd> |
|
118 </dl> |
|
119 <div align="right"><a href="#top">Up</a></div> |
|
120 <hr /><hr /> |
|
121 <a NAME="initService" ID="initService"></a> |
|
122 <h2>initService</h2> |
|
123 <b>initService</b>(<i></i>) |
|
124 <p> |
|
125 Initialize the service and return the entry point. |
|
126 </p><dl> |
|
127 <dt>Returns:</dt> |
|
128 <dd> |
|
129 the entry point for the background client (function) |
|
130 </dd> |
|
131 </dl> |
|
132 <div align="right"><a href="#top">Up</a></div> |
|
133 <hr /><hr /> |
|
134 <a NAME="maintainabilityIndex" ID="maintainabilityIndex"></a> |
|
135 <h2>maintainabilityIndex</h2> |
|
136 <b>maintainabilityIndex</b>(<i>file, text=""</i>) |
|
137 <p> |
|
138 Private function to calculate the maintainability index of one file. |
|
139 </p><dl> |
|
140 <dt><i>file</i> (str)</dt> |
|
141 <dd> |
|
142 source filename |
|
143 </dd><dt><i>text</i> (str)</dt> |
|
144 <dd> |
|
145 source text |
|
146 </dd> |
|
147 </dl><dl> |
|
148 <dt>Returns:</dt> |
|
149 <dd> |
|
150 tuple containing the result dictionary |
|
151 </dd> |
|
152 </dl><dl> |
|
153 <dt>Return Type:</dt> |
|
154 <dd> |
|
155 (tuple of dict) |
|
156 </dd> |
|
157 </dl> |
|
158 <div align="right"><a href="#top">Up</a></div> |
|
159 <hr /><hr /> |
|
160 <a NAME="worker" ID="worker"></a> |
|
161 <h2>worker</h2> |
|
162 <b>worker</b>(<i>input, output</i>) |
|
163 <p> |
|
164 Module function acting as the parallel worker for the maintainability |
|
165 index calculation. |
|
166 </p><dl> |
|
167 <dt><i>input</i> (multiprocessing.Queue)</dt> |
|
168 <dd> |
|
169 input queue |
|
170 </dd><dt><i>output</i> (multiprocessing.Queue)</dt> |
|
171 <dd> |
|
172 output queue |
|
173 </dd> |
|
174 </dl> |
|
175 <div align="right"><a href="#top">Up</a></div> |
|
176 <hr /> |
|
177 </body></html> |