1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>Plugin_Checker_PyLint.PluginPyLint</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> |
|
22 <a NAME="top" ID="top"></a> |
|
23 <h1>Plugin_Checker_PyLint.PluginPyLint</h1> |
|
24 |
|
25 <p> |
|
26 Module implementing the PyLint plug-in. |
|
27 </p> |
|
28 <h3>Global Attributes</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>author</td></tr><tr><td>autoactivate</td></tr><tr><td>className</td></tr><tr><td>deactivateable</td></tr><tr><td>error</td></tr><tr><td>exePy3</td></tr><tr><td>longDescription</td></tr><tr><td>name</td></tr><tr><td>needsRestart</td></tr><tr><td>packageName</td></tr><tr><td>pyqtApi</td></tr><tr><td>shortDescription</td></tr><tr><td>version</td></tr> |
|
32 </table> |
|
33 <h3>Classes</h3> |
|
34 |
|
35 <table> |
|
36 |
|
37 <tr> |
|
38 <td><a href="#PyLintPlugin">PyLintPlugin</a></td> |
|
39 <td>Class implementing the PyLint plug-in.</td> |
|
40 </tr> |
|
41 </table> |
|
42 <h3>Functions</h3> |
|
43 |
|
44 <table> |
|
45 |
|
46 <tr> |
|
47 <td><a href="#__getProgramVersion">__getProgramVersion</a></td> |
|
48 <td>Private method to generate a program entry.</td> |
|
49 </tr> |
|
50 <tr> |
|
51 <td><a href="#_checkProgram">_checkProgram</a></td> |
|
52 <td>Restricted function to check the availability of pylint.</td> |
|
53 </tr> |
|
54 <tr> |
|
55 <td><a href="#_findExecutable">_findExecutable</a></td> |
|
56 <td>Restricted function to determine the name and path of the executable.</td> |
|
57 </tr> |
|
58 <tr> |
|
59 <td><a href="#exeDisplayDataList">exeDisplayDataList</a></td> |
|
60 <td>Public method to support the display of some executable info.</td> |
|
61 </tr> |
|
62 <tr> |
|
63 <td><a href="#getExePath">getExePath</a></td> |
|
64 <td></td> |
|
65 </tr> |
|
66 </table> |
|
67 <hr /> |
|
68 <hr /> |
|
69 <a NAME="PyLintPlugin" ID="PyLintPlugin"></a> |
|
70 <h2>PyLintPlugin</h2> |
|
71 |
|
72 <p> |
|
73 Class implementing the PyLint plug-in. |
|
74 </p> |
|
75 <h3>Derived from</h3> |
|
76 QObject |
|
77 <h3>Class Attributes</h3> |
|
78 |
|
79 <table> |
|
80 <tr><td>None</td></tr> |
|
81 </table> |
|
82 <h3>Class Methods</h3> |
|
83 |
|
84 <table> |
|
85 <tr><td>None</td></tr> |
|
86 </table> |
|
87 <h3>Methods</h3> |
|
88 |
|
89 <table> |
|
90 |
|
91 <tr> |
|
92 <td><a href="#PyLintPlugin.__init__">PyLintPlugin</a></td> |
|
93 <td>Constructor</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#PyLintPlugin.__editorClosed">__editorClosed</a></td> |
|
97 <td>Private slot called, when an editor was closed.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#PyLintPlugin.__editorOpened">__editorOpened</a></td> |
|
101 <td>Private slot called, when a new editor was opened.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#PyLintPlugin.__editorPylint">__editorPylint</a></td> |
|
105 <td>Private slot to handle the Pylint context menu action of the editors.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#PyLintPlugin.__editorShowMenu">__editorShowMenu</a></td> |
|
109 <td>Private slot called, when the the editor context menu or a submenu is about to be shown.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#PyLintPlugin.__initialize">__initialize</a></td> |
|
113 <td>Private slot to (re)initialize the plugin.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#PyLintPlugin.__loadTranslator">__loadTranslator</a></td> |
|
117 <td>Private method to load the translation file.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#PyLintPlugin.__projectBrowserPylint">__projectBrowserPylint</a></td> |
|
121 <td>Private method to handle the Pylint context menu action of the project sources browser.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#PyLintPlugin.__projectBrowserPylintShow">__projectBrowserPylintShow</a></td> |
|
125 <td>Private slot to show the PyLint dialog with the results of the last run.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#PyLintPlugin.__projectBrowserShowMenu">__projectBrowserShowMenu</a></td> |
|
129 <td>Private slot called, when the the project browser menu or a submenu is about to be shown.</td> |
|
130 </tr> |
|
131 <tr> |
|
132 <td><a href="#PyLintPlugin.__projectPylint">__projectPylint</a></td> |
|
133 <td>Private slot used to check the project files with Pylint.</td> |
|
134 </tr> |
|
135 <tr> |
|
136 <td><a href="#PyLintPlugin.__projectPylintShow">__projectPylintShow</a></td> |
|
137 <td>Private slot to show the PyLint dialog with the results of the last run.</td> |
|
138 </tr> |
|
139 <tr> |
|
140 <td><a href="#PyLintPlugin.__projectShowMenu">__projectShowMenu</a></td> |
|
141 <td>Private slot called, when the the project menu or a submenu is about to be shown.</td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td><a href="#PyLintPlugin.__pyLint">__pyLint</a></td> |
|
145 <td>Private method used to perform a PyLint run.</td> |
|
146 </tr> |
|
147 <tr> |
|
148 <td><a href="#PyLintPlugin.activate">activate</a></td> |
|
149 <td>Public method to activate this plugin.</td> |
|
150 </tr> |
|
151 <tr> |
|
152 <td><a href="#PyLintPlugin.deactivate">deactivate</a></td> |
|
153 <td>Public method to deactivate this plugin.</td> |
|
154 </tr> |
|
155 </table> |
|
156 <h3>Static Methods</h3> |
|
157 |
|
158 <table> |
|
159 <tr><td>None</td></tr> |
|
160 </table> |
|
161 |
|
162 <a NAME="PyLintPlugin.__init__" ID="PyLintPlugin.__init__"></a> |
|
163 <h4>PyLintPlugin (Constructor)</h4> |
|
164 <b>PyLintPlugin</b>(<i>ui</i>) |
|
165 |
|
166 <p> |
|
167 Constructor |
|
168 </p> |
|
169 <dl> |
|
170 |
|
171 <dt><i>ui</i></dt> |
|
172 <dd> |
|
173 reference to the user interface object (UI.UserInterface) |
|
174 </dd> |
|
175 </dl> |
|
176 <a NAME="PyLintPlugin.__editorClosed" ID="PyLintPlugin.__editorClosed"></a> |
|
177 <h4>PyLintPlugin.__editorClosed</h4> |
|
178 <b>__editorClosed</b>(<i>editor</i>) |
|
179 |
|
180 <p> |
|
181 Private slot called, when an editor was closed. |
|
182 </p> |
|
183 <dl> |
|
184 |
|
185 <dt><i>editor</i></dt> |
|
186 <dd> |
|
187 reference to the editor (QScintilla.Editor) |
|
188 </dd> |
|
189 </dl> |
|
190 <a NAME="PyLintPlugin.__editorOpened" ID="PyLintPlugin.__editorOpened"></a> |
|
191 <h4>PyLintPlugin.__editorOpened</h4> |
|
192 <b>__editorOpened</b>(<i>editor</i>) |
|
193 |
|
194 <p> |
|
195 Private slot called, when a new editor was opened. |
|
196 </p> |
|
197 <dl> |
|
198 |
|
199 <dt><i>editor</i></dt> |
|
200 <dd> |
|
201 reference to the new editor (QScintilla.Editor) |
|
202 </dd> |
|
203 </dl> |
|
204 <a NAME="PyLintPlugin.__editorPylint" ID="PyLintPlugin.__editorPylint"></a> |
|
205 <h4>PyLintPlugin.__editorPylint</h4> |
|
206 <b>__editorPylint</b>(<i></i>) |
|
207 |
|
208 <p> |
|
209 Private slot to handle the Pylint context menu action of the editors. |
|
210 </p> |
|
211 <a NAME="PyLintPlugin.__editorShowMenu" ID="PyLintPlugin.__editorShowMenu"></a> |
|
212 <h4>PyLintPlugin.__editorShowMenu</h4> |
|
213 <b>__editorShowMenu</b>(<i>menuName, menu, editor</i>) |
|
214 |
|
215 <p> |
|
216 Private slot called, when the the editor context menu or a submenu is |
|
217 about to be shown. |
|
218 </p> |
|
219 <dl> |
|
220 |
|
221 <dt><i>menuName</i></dt> |
|
222 <dd> |
|
223 name of the menu to be shown (string) |
|
224 </dd> |
|
225 <dt><i>menu</i></dt> |
|
226 <dd> |
|
227 reference to the menu (QMenu) |
|
228 </dd> |
|
229 <dt><i>editor</i></dt> |
|
230 <dd> |
|
231 reference to the editor (QScintilla.Editor) |
|
232 </dd> |
|
233 </dl> |
|
234 <a NAME="PyLintPlugin.__initialize" ID="PyLintPlugin.__initialize"></a> |
|
235 <h4>PyLintPlugin.__initialize</h4> |
|
236 <b>__initialize</b>(<i></i>) |
|
237 |
|
238 <p> |
|
239 Private slot to (re)initialize the plugin. |
|
240 </p> |
|
241 <a NAME="PyLintPlugin.__loadTranslator" ID="PyLintPlugin.__loadTranslator"></a> |
|
242 <h4>PyLintPlugin.__loadTranslator</h4> |
|
243 <b>__loadTranslator</b>(<i></i>) |
|
244 |
|
245 <p> |
|
246 Private method to load the translation file. |
|
247 </p> |
|
248 <a NAME="PyLintPlugin.__projectBrowserPylint" ID="PyLintPlugin.__projectBrowserPylint"></a> |
|
249 <h4>PyLintPlugin.__projectBrowserPylint</h4> |
|
250 <b>__projectBrowserPylint</b>(<i></i>) |
|
251 |
|
252 <p> |
|
253 Private method to handle the Pylint context menu action of the project |
|
254 sources browser. |
|
255 </p> |
|
256 <a NAME="PyLintPlugin.__projectBrowserPylintShow" ID="PyLintPlugin.__projectBrowserPylintShow"></a> |
|
257 <h4>PyLintPlugin.__projectBrowserPylintShow</h4> |
|
258 <b>__projectBrowserPylintShow</b>(<i></i>) |
|
259 |
|
260 <p> |
|
261 Private slot to show the PyLint dialog with the results of the last |
|
262 run. |
|
263 </p> |
|
264 <a NAME="PyLintPlugin.__projectBrowserShowMenu" ID="PyLintPlugin.__projectBrowserShowMenu"></a> |
|
265 <h4>PyLintPlugin.__projectBrowserShowMenu</h4> |
|
266 <b>__projectBrowserShowMenu</b>(<i>menuName, menu</i>) |
|
267 |
|
268 <p> |
|
269 Private slot called, when the the project browser menu or a submenu is |
|
270 about to be shown. |
|
271 </p> |
|
272 <dl> |
|
273 |
|
274 <dt><i>menuName</i></dt> |
|
275 <dd> |
|
276 name of the menu to be shown (string) |
|
277 </dd> |
|
278 <dt><i>menu</i></dt> |
|
279 <dd> |
|
280 reference to the menu (QMenu) |
|
281 </dd> |
|
282 </dl> |
|
283 <a NAME="PyLintPlugin.__projectPylint" ID="PyLintPlugin.__projectPylint"></a> |
|
284 <h4>PyLintPlugin.__projectPylint</h4> |
|
285 <b>__projectPylint</b>(<i></i>) |
|
286 |
|
287 <p> |
|
288 Private slot used to check the project files with Pylint. |
|
289 </p> |
|
290 <a NAME="PyLintPlugin.__projectPylintShow" ID="PyLintPlugin.__projectPylintShow"></a> |
|
291 <h4>PyLintPlugin.__projectPylintShow</h4> |
|
292 <b>__projectPylintShow</b>(<i></i>) |
|
293 |
|
294 <p> |
|
295 Private slot to show the PyLint dialog with the results of the last |
|
296 run. |
|
297 </p> |
|
298 <a NAME="PyLintPlugin.__projectShowMenu" ID="PyLintPlugin.__projectShowMenu"></a> |
|
299 <h4>PyLintPlugin.__projectShowMenu</h4> |
|
300 <b>__projectShowMenu</b>(<i>menuName, menu</i>) |
|
301 |
|
302 <p> |
|
303 Private slot called, when the the project menu or a submenu is |
|
304 about to be shown. |
|
305 </p> |
|
306 <dl> |
|
307 |
|
308 <dt><i>menuName</i></dt> |
|
309 <dd> |
|
310 name of the menu to be shown (string) |
|
311 </dd> |
|
312 <dt><i>menu</i></dt> |
|
313 <dd> |
|
314 reference to the menu (QMenu) |
|
315 </dd> |
|
316 </dl> |
|
317 <a NAME="PyLintPlugin.__pyLint" ID="PyLintPlugin.__pyLint"></a> |
|
318 <h4>PyLintPlugin.__pyLint</h4> |
|
319 <b>__pyLint</b>(<i>project, mpName, forProject, forEditor=False</i>) |
|
320 |
|
321 <p> |
|
322 Private method used to perform a PyLint run. |
|
323 </p> |
|
324 <dl> |
|
325 |
|
326 <dt><i>project</i></dt> |
|
327 <dd> |
|
328 reference to the Project object |
|
329 </dd> |
|
330 <dt><i>mpName</i></dt> |
|
331 <dd> |
|
332 name of module or package to be checked (string) |
|
333 </dd> |
|
334 <dt><i>forProject</i></dt> |
|
335 <dd> |
|
336 flag indicating a run for the project (boolean) |
|
337 </dd> |
|
338 <dt><i>forEditor</i></dt> |
|
339 <dd> |
|
340 flag indicating a run for an editor (boolean) |
|
341 </dd> |
|
342 </dl> |
|
343 <a NAME="PyLintPlugin.activate" ID="PyLintPlugin.activate"></a> |
|
344 <h4>PyLintPlugin.activate</h4> |
|
345 <b>activate</b>(<i></i>) |
|
346 |
|
347 <p> |
|
348 Public method to activate this plugin. |
|
349 </p> |
|
350 <dl> |
|
351 <dt>Return:</dt> |
|
352 <dd> |
|
353 tuple of None and activation status (boolean) |
|
354 </dd> |
|
355 </dl> |
|
356 <a NAME="PyLintPlugin.deactivate" ID="PyLintPlugin.deactivate"></a> |
|
357 <h4>PyLintPlugin.deactivate</h4> |
|
358 <b>deactivate</b>(<i></i>) |
|
359 |
|
360 <p> |
|
361 Public method to deactivate this plugin. |
|
362 </p> |
|
363 <div align="right"><a href="#top">Up</a></div> |
|
364 <hr /> |
|
365 <hr /> |
|
366 <a NAME="__getProgramVersion" ID="__getProgramVersion"></a> |
|
367 <h2>__getProgramVersion</h2> |
|
368 <b>__getProgramVersion</b>(<i>exe</i>) |
|
369 |
|
370 <p> |
|
371 Private method to generate a program entry. |
|
372 </p> |
|
373 <dl> |
|
374 |
|
375 <dt><i>exe</i></dt> |
|
376 <dd> |
|
377 name of the executable program (string) |
|
378 </dd> |
|
379 </dl> |
|
380 <dl> |
|
381 <dt>Return:</dt> |
|
382 <dd> |
|
383 version string of detected version (string) |
|
384 </dd> |
|
385 </dl> |
|
386 <div align="right"><a href="#top">Up</a></div> |
|
387 <hr /> |
|
388 <hr /> |
|
389 <a NAME="_checkProgram" ID="_checkProgram"></a> |
|
390 <h2>_checkProgram</h2> |
|
391 <b>_checkProgram</b>(<i></i>) |
|
392 |
|
393 <p> |
|
394 Restricted function to check the availability of pylint. |
|
395 </p> |
|
396 <dl> |
|
397 <dt>Return:</dt> |
|
398 <dd> |
|
399 flag indicating availability (boolean) |
|
400 </dd> |
|
401 </dl> |
|
402 <div align="right"><a href="#top">Up</a></div> |
|
403 <hr /> |
|
404 <hr /> |
|
405 <a NAME="_findExecutable" ID="_findExecutable"></a> |
|
406 <h2>_findExecutable</h2> |
|
407 <b>_findExecutable</b>(<i>majorVersion</i>) |
|
408 |
|
409 <p> |
|
410 Restricted function to determine the name and path of the executable. |
|
411 </p> |
|
412 <dl> |
|
413 |
|
414 <dt><i>majorVersion</i></dt> |
|
415 <dd> |
|
416 major python version of the executables (int) |
|
417 </dd> |
|
418 </dl> |
|
419 <dl> |
|
420 <dt>Return:</dt> |
|
421 <dd> |
|
422 path name of the executable (string) |
|
423 </dd> |
|
424 </dl> |
|
425 <div align="right"><a href="#top">Up</a></div> |
|
426 <hr /> |
|
427 <hr /> |
|
428 <a NAME="exeDisplayDataList" ID="exeDisplayDataList"></a> |
|
429 <h2>exeDisplayDataList</h2> |
|
430 <b>exeDisplayDataList</b>(<i></i>) |
|
431 |
|
432 <p> |
|
433 Public method to support the display of some executable info. |
|
434 </p> |
|
435 <dl> |
|
436 <dt>Return:</dt> |
|
437 <dd> |
|
438 dictionary containing the data to query the presence of |
|
439 the executable |
|
440 </dd> |
|
441 </dl> |
|
442 <div align="right"><a href="#top">Up</a></div> |
|
443 <hr /> |
|
444 <hr /> |
|
445 <a NAME="getExePath" ID="getExePath"></a> |
|
446 <h2>getExePath</h2> |
|
447 <b>getExePath</b>(<i>branch, access, versionStr</i>) |
|
448 |
|
449 <div align="right"><a href="#top">Up</a></div> |
|
450 <hr /> |
|
451 </body></html> |
|