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