|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>Plugin_Checker_Vulture.VultureChecker.VultureCheckerService</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_Checker_Vulture.VultureChecker.VultureCheckerService</h1> |
|
23 <p> |
|
24 Module implementing the cyclomatic complexity 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> |
|
33 <td><a href="#EricVulture">EricVulture</a></td> |
|
34 <td>Class to adopt the Vulture class to the eric plug-in functionality.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr> |
|
40 <td><a href="#__analyze">__analyze</a></td> |
|
41 <td>Private function to analyze one Python file.</td> |
|
42 </tr><tr> |
|
43 <td><a href="#batchVultureCheck">batchVultureCheck</a></td> |
|
44 <td>Module function to analyze a batch of files.</td> |
|
45 </tr><tr> |
|
46 <td><a href="#initBatchService">initBatchService</a></td> |
|
47 <td>Initialize the batch service and return the entry point.</td> |
|
48 </tr><tr> |
|
49 <td><a href="#initService">initService</a></td> |
|
50 <td>Initialize the service and return the entry point.</td> |
|
51 </tr><tr> |
|
52 <td><a href="#vultureCheck">vultureCheck</a></td> |
|
53 <td>Private function to analyze one file.</td> |
|
54 </tr><tr> |
|
55 <td><a href="#worker">worker</a></td> |
|
56 <td>Module function acting as the parallel worker for the cyclomatic complexity calculation.</td> |
|
57 </tr> |
|
58 </table> |
|
59 <hr /><hr /> |
|
60 <a NAME="EricVulture" ID="EricVulture"></a> |
|
61 <h2>EricVulture</h2> |
|
62 <p> |
|
63 Class to adopt the Vulture class to the eric plug-in functionality. |
|
64 </p> |
|
65 <h3>Derived from</h3> |
|
66 Vulture |
|
67 <h3>Class Attributes</h3> |
|
68 <table> |
|
69 <tr><td>None</td></tr> |
|
70 </table> |
|
71 <h3>Class Methods</h3> |
|
72 <table> |
|
73 <tr><td>None</td></tr> |
|
74 </table> |
|
75 <h3>Methods</h3> |
|
76 <table> |
|
77 <tr> |
|
78 <td><a href="#EricVulture.__init__">EricVulture</a></td> |
|
79 <td>Constructor</td> |
|
80 </tr><tr> |
|
81 <td><a href="#EricVulture.__item2Dict">__item2Dict</a></td> |
|
82 <td>Private method to convert a vulture item to a dictionary.</td> |
|
83 </tr><tr> |
|
84 <td><a href="#EricVulture.getResults">getResults</a></td> |
|
85 <td>Public method to get the scan results.</td> |
|
86 </tr><tr> |
|
87 <td><a href="#EricVulture.scan">scan</a></td> |
|
88 <td>Public method to scan the source text.</td> |
|
89 </tr> |
|
90 </table> |
|
91 <h3>Static Methods</h3> |
|
92 <table> |
|
93 <tr><td>None</td></tr> |
|
94 </table> |
|
95 <a NAME="EricVulture.__init__" ID="EricVulture.__init__"></a> |
|
96 <h4>EricVulture (Constructor)</h4> |
|
97 <b>EricVulture</b>(<i>filename</i>) |
|
98 <p> |
|
99 Constructor |
|
100 </p><dl> |
|
101 <dt><i>filename</i> (str)</dt> |
|
102 <dd> |
|
103 source file name |
|
104 </dd> |
|
105 </dl><a NAME="EricVulture.__item2Dict" ID="EricVulture.__item2Dict"></a> |
|
106 <h4>EricVulture.__item2Dict</h4> |
|
107 <b>__item2Dict</b>(<i>item</i>) |
|
108 <p> |
|
109 Private method to convert a vulture item to a dictionary. |
|
110 </p><dl> |
|
111 <dt><i>item</i> (vulture.Item)</dt> |
|
112 <dd> |
|
113 vulture item |
|
114 </dd> |
|
115 </dl><dl> |
|
116 <dt>Returns:</dt> |
|
117 <dd> |
|
118 item dictionary |
|
119 </dd> |
|
120 </dl><dl> |
|
121 <dt>Return Type:</dt> |
|
122 <dd> |
|
123 dict |
|
124 </dd> |
|
125 </dl><a NAME="EricVulture.getResults" ID="EricVulture.getResults"></a> |
|
126 <h4>EricVulture.getResults</h4> |
|
127 <b>getResults</b>(<i></i>) |
|
128 <p> |
|
129 Public method to get the scan results. |
|
130 </p><dl> |
|
131 <dt>Returns:</dt> |
|
132 <dd> |
|
133 scan results |
|
134 </dd> |
|
135 </dl><dl> |
|
136 <dt>Return Type:</dt> |
|
137 <dd> |
|
138 dict |
|
139 </dd> |
|
140 </dl><a NAME="EricVulture.scan" ID="EricVulture.scan"></a> |
|
141 <h4>EricVulture.scan</h4> |
|
142 <b>scan</b>(<i>source</i>) |
|
143 <p> |
|
144 Public method to scan the source text. |
|
145 </p><dl> |
|
146 <dt><i>source</i> (str)</dt> |
|
147 <dd> |
|
148 source text |
|
149 </dd> |
|
150 </dl> |
|
151 <div align="right"><a href="#top">Up</a></div> |
|
152 <hr /><hr /> |
|
153 <a NAME="__analyze" ID="__analyze"></a> |
|
154 <h2>__analyze</h2> |
|
155 <b>__analyze</b>(<i>file, text=""</i>) |
|
156 <p> |
|
157 Private function to analyze one Python file. |
|
158 </p><dl> |
|
159 <dt><i>file</i> (str)</dt> |
|
160 <dd> |
|
161 source file name |
|
162 </dd><dt><i>text</i> (str)</dt> |
|
163 <dd> |
|
164 source text |
|
165 </dd> |
|
166 </dl><dl> |
|
167 <dt>Returns:</dt> |
|
168 <dd> |
|
169 tuple containing the result dictionary |
|
170 </dd> |
|
171 </dl><dl> |
|
172 <dt>Return Type:</dt> |
|
173 <dd> |
|
174 (tuple of dict) |
|
175 </dd> |
|
176 </dl> |
|
177 <div align="right"><a href="#top">Up</a></div> |
|
178 <hr /><hr /> |
|
179 <a NAME="batchVultureCheck" ID="batchVultureCheck"></a> |
|
180 <h2>batchVultureCheck</h2> |
|
181 <b>batchVultureCheck</b>(<i>argumentsList, send, fx, cancelled</i>) |
|
182 <p> |
|
183 Module function to analyze a batch of files. |
|
184 </p><dl> |
|
185 <dt><i>argumentsList</i> (list)</dt> |
|
186 <dd> |
|
187 list of arguments tuples as given for vultureCheck |
|
188 </dd><dt><i>send</i> (function)</dt> |
|
189 <dd> |
|
190 reference to send function |
|
191 </dd><dt><i>fx</i> (str)</dt> |
|
192 <dd> |
|
193 registered service name |
|
194 </dd><dt><i>cancelled</i> (function)</dt> |
|
195 <dd> |
|
196 reference to function checking for a cancellation |
|
197 </dd> |
|
198 </dl> |
|
199 <div align="right"><a href="#top">Up</a></div> |
|
200 <hr /><hr /> |
|
201 <a NAME="initBatchService" ID="initBatchService"></a> |
|
202 <h2>initBatchService</h2> |
|
203 <b>initBatchService</b>(<i></i>) |
|
204 <p> |
|
205 Initialize the batch service and return the entry point. |
|
206 </p><dl> |
|
207 <dt>Returns:</dt> |
|
208 <dd> |
|
209 the entry point for the background client (function) |
|
210 </dd> |
|
211 </dl> |
|
212 <div align="right"><a href="#top">Up</a></div> |
|
213 <hr /><hr /> |
|
214 <a NAME="initService" ID="initService"></a> |
|
215 <h2>initService</h2> |
|
216 <b>initService</b>(<i></i>) |
|
217 <p> |
|
218 Initialize the service and return the entry point. |
|
219 </p><dl> |
|
220 <dt>Returns:</dt> |
|
221 <dd> |
|
222 the entry point for the background client (function) |
|
223 </dd> |
|
224 </dl> |
|
225 <div align="right"><a href="#top">Up</a></div> |
|
226 <hr /><hr /> |
|
227 <a NAME="vultureCheck" ID="vultureCheck"></a> |
|
228 <h2>vultureCheck</h2> |
|
229 <b>vultureCheck</b>(<i>file, text=""</i>) |
|
230 <p> |
|
231 Private function to analyze one file. |
|
232 </p><dl> |
|
233 <dt><i>file</i> (str)</dt> |
|
234 <dd> |
|
235 source filename |
|
236 </dd><dt><i>text</i> (str)</dt> |
|
237 <dd> |
|
238 source text |
|
239 </dd> |
|
240 </dl><dl> |
|
241 <dt>Returns:</dt> |
|
242 <dd> |
|
243 tuple containing the result dictionary |
|
244 </dd> |
|
245 </dl><dl> |
|
246 <dt>Return Type:</dt> |
|
247 <dd> |
|
248 (tuple of dict) |
|
249 </dd> |
|
250 </dl> |
|
251 <div align="right"><a href="#top">Up</a></div> |
|
252 <hr /><hr /> |
|
253 <a NAME="worker" ID="worker"></a> |
|
254 <h2>worker</h2> |
|
255 <b>worker</b>(<i>input, output</i>) |
|
256 <p> |
|
257 Module function acting as the parallel worker for the cyclomatic |
|
258 complexity calculation. |
|
259 </p><dl> |
|
260 <dt><i>input</i> (multiprocessing.Queue)</dt> |
|
261 <dd> |
|
262 input queue |
|
263 </dd><dt><i>output</i> (multiprocessing.Queue)</dt> |
|
264 <dd> |
|
265 output queue |
|
266 </dd> |
|
267 </dl> |
|
268 <div align="right"><a href="#top">Up</a></div> |
|
269 <hr /> |
|
270 </body></html> |