Documentation/Source/eric5.Plugins.CheckerPlugins.Pep8.Pep8Dialog.html

branch
Py2 comp.
changeset 2911
ce77f0b1ee67
parent 2607
e5115553185a
parent 2878
61042247f793
child 3056
9986ec0e559a
equal deleted inserted replaced
2847:1843ef6e2656 2911:ce77f0b1ee67
30 <h3>Classes</h3> 30 <h3>Classes</h3>
31 <table> 31 <table>
32 <tr> 32 <tr>
33 <td><a href="#Pep8Dialog">Pep8Dialog</a></td> 33 <td><a href="#Pep8Dialog">Pep8Dialog</a></td>
34 <td>Class implementing a dialog to show the results of the PEP 8 check.</td> 34 <td>Class implementing a dialog to show the results of the PEP 8 check.</td>
35 </tr><tr>
36 <td><a href="#Pep8Report">Pep8Report</a></td>
37 <td>Class implementing a special report to be used with our dialog.</td>
35 </tr> 38 </tr>
36 </table> 39 </table>
37 <h3>Functions</h3> 40 <h3>Functions</h3>
38 <table> 41 <table>
39 <tr><td>None</td></tr> 42 <tr><td>None</td></tr>
46 </p> 49 </p>
47 <h3>Derived from</h3> 50 <h3>Derived from</h3>
48 QDialog, Ui_Pep8Dialog 51 QDialog, Ui_Pep8Dialog
49 <h3>Class Attributes</h3> 52 <h3>Class Attributes</h3>
50 <table> 53 <table>
51 <tr><td>filenameRole</td></tr><tr><td>lineRole</td></tr><tr><td>messageRole</td></tr><tr><td>positionRole</td></tr><tr><td>settingsKey</td></tr> 54 <tr><td>codeRole</td></tr><tr><td>filenameRole</td></tr><tr><td>fixableRole</td></tr><tr><td>lineRole</td></tr><tr><td>messageRole</td></tr><tr><td>positionRole</td></tr>
52 </table> 55 </table>
53 <h3>Class Methods</h3> 56 <h3>Class Methods</h3>
54 <table> 57 <table>
55 <tr><td>None</td></tr> 58 <tr><td>None</td></tr>
56 </table> 59 </table>
61 <td>Constructor</td> 64 <td>Constructor</td>
62 </tr><tr> 65 </tr><tr>
63 <td><a href="#Pep8Dialog.__clearErrors">__clearErrors</a></td> 66 <td><a href="#Pep8Dialog.__clearErrors">__clearErrors</a></td>
64 <td>Private method to clear all warning markers of open editors.</td> 67 <td>Private method to clear all warning markers of open editors.</td>
65 </tr><tr> 68 </tr><tr>
66 <td><a href="#Pep8Dialog.__createErrorItem">__createErrorItem</a></td>
67 <td>Private method to create an entry in the result list.</td>
68 </tr><tr>
69 <td><a href="#Pep8Dialog.__createResultItem">__createResultItem</a></td> 69 <td><a href="#Pep8Dialog.__createResultItem">__createResultItem</a></td>
70 <td>Private method to create an entry in the result list.</td> 70 <td>Private method to create an entry in the result list.</td>
71 </tr><tr> 71 </tr><tr>
72 <td><a href="#Pep8Dialog.__finish">__finish</a></td> 72 <td><a href="#Pep8Dialog.__finish">__finish</a></td>
73 <td>Private slot called when the PEP 8 check finished or the user pressed the cancel button.</td> 73 <td>Private slot called when the PEP 8 check finished or the user pressed the cancel button.</td>
74 </tr><tr> 74 </tr><tr>
75 <td><a href="#Pep8Dialog.__getSelectedFixableItems">__getSelectedFixableItems</a></td>
76 <td>Private method to extract all selected items for fixable issues.</td>
77 </tr><tr>
78 <td><a href="#Pep8Dialog.__itemFixable">__itemFixable</a></td>
79 <td>Private method to check, if an item has a fixable issue.</td>
80 </tr><tr>
81 <td><a href="#Pep8Dialog.__modifyFixedResultItem">__modifyFixedResultItem</a></td>
82 <td>Private method to modify a result list entry to show its positive fixed state.</td>
83 </tr><tr>
75 <td><a href="#Pep8Dialog.__resetStatistics">__resetStatistics</a></td> 84 <td><a href="#Pep8Dialog.__resetStatistics">__resetStatistics</a></td>
76 <td>Private slot to reset the statistics data.</td> 85 <td>Private slot to reset the statistics data.</td>
77 </tr><tr> 86 </tr><tr>
78 <td><a href="#Pep8Dialog.__resort">__resort</a></td> 87 <td><a href="#Pep8Dialog.__resort">__resort</a></td>
79 <td>Private method to resort the tree.</td> 88 <td>Private method to resort the tree.</td>
80 </tr><tr> 89 </tr><tr>
90 <td><a href="#Pep8Dialog.__selectCodes">__selectCodes</a></td>
91 <td>Private method to select message codes via a selection dialog.</td>
92 </tr><tr>
93 <td><a href="#Pep8Dialog.__updateFixerStatistics">__updateFixerStatistics</a></td>
94 <td>Private method to update the collected fixer related statistics.</td>
95 </tr><tr>
81 <td><a href="#Pep8Dialog.__updateStatistics">__updateStatistics</a></td> 96 <td><a href="#Pep8Dialog.__updateStatistics">__updateStatistics</a></td>
82 <td>Private method to update the collected statistics.</td> 97 <td>Private method to update the collected statistics.</td>
83 </tr><tr> 98 </tr><tr>
84 <td><a href="#Pep8Dialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td> 99 <td><a href="#Pep8Dialog.on_buttonBox_clicked">on_buttonBox_clicked</a></td>
85 <td>Private slot called by a button of the button box clicked.</td> 100 <td>Private slot called by a button of the button box clicked.</td>
86 </tr><tr> 101 </tr><tr>
87 <td><a href="#Pep8Dialog.on_excludeMessagesSelectButton_clicked">on_excludeMessagesSelectButton_clicked</a></td> 102 <td><a href="#Pep8Dialog.on_excludeMessagesSelectButton_clicked">on_excludeMessagesSelectButton_clicked</a></td>
88 <td>Private slot to select the message codes to be excluded via a selection dialog.</td> 103 <td>Private slot to select the message codes to be excluded via a selection dialog.</td>
89 </tr><tr> 104 </tr><tr>
105 <td><a href="#Pep8Dialog.on_fixButton_clicked">on_fixButton_clicked</a></td>
106 <td>Private slot to fix selected issues.</td>
107 </tr><tr>
90 <td><a href="#Pep8Dialog.on_fixIssuesSelectButton_clicked">on_fixIssuesSelectButton_clicked</a></td> 108 <td><a href="#Pep8Dialog.on_fixIssuesSelectButton_clicked">on_fixIssuesSelectButton_clicked</a></td>
91 <td>Private slot to select the issue codes to be fixed via a selection dialog.</td> 109 <td>Private slot to select the issue codes to be fixed via a selection dialog.</td>
92 </tr><tr> 110 </tr><tr>
93 <td><a href="#Pep8Dialog.on_includeMessagesSelectButton_clicked">on_includeMessagesSelectButton_clicked</a></td> 111 <td><a href="#Pep8Dialog.on_includeMessagesSelectButton_clicked">on_includeMessagesSelectButton_clicked</a></td>
94 <td>Private slot to select the message codes to be included via a selection dialog.</td> 112 <td>Private slot to select the message codes to be included via a selection dialog.</td>
95 </tr><tr> 113 </tr><tr>
96 <td><a href="#Pep8Dialog.on_loadDefaultButton_clicked">on_loadDefaultButton_clicked</a></td> 114 <td><a href="#Pep8Dialog.on_loadDefaultButton_clicked">on_loadDefaultButton_clicked</a></td>
97 <td>Private slot to load the default configuration values.</td> 115 <td>Private slot to load the default configuration values.</td>
98 </tr><tr> 116 </tr><tr>
117 <td><a href="#Pep8Dialog.on_noFixIssuesSelectButton_clicked">on_noFixIssuesSelectButton_clicked</a></td>
118 <td>Private slot to select the issue codes not to be fixed via a selection dialog.</td>
119 </tr><tr>
120 <td><a href="#Pep8Dialog.on_resetDefaultButton_clicked">on_resetDefaultButton_clicked</a></td>
121 <td>Slot documentation goes here.</td>
122 </tr><tr>
99 <td><a href="#Pep8Dialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td> 123 <td><a href="#Pep8Dialog.on_resultList_itemActivated">on_resultList_itemActivated</a></td>
100 <td>Private slot to handle the activation of an item.</td> 124 <td>Private slot to handle the activation of an item.</td>
125 </tr><tr>
126 <td><a href="#Pep8Dialog.on_resultList_itemSelectionChanged">on_resultList_itemSelectionChanged</a></td>
127 <td>Private slot to change the dialog state depending on the selection.</td>
101 </tr><tr> 128 </tr><tr>
102 <td><a href="#Pep8Dialog.on_showButton_clicked">on_showButton_clicked</a></td> 129 <td><a href="#Pep8Dialog.on_showButton_clicked">on_showButton_clicked</a></td>
103 <td>Private slot to handle the "Show" button press.</td> 130 <td>Private slot to handle the "Show" button press.</td>
104 </tr><tr> 131 </tr><tr>
105 <td><a href="#Pep8Dialog.on_startButton_clicked">on_startButton_clicked</a></td> 132 <td><a href="#Pep8Dialog.on_startButton_clicked">on_startButton_clicked</a></td>
135 </dl><a NAME="Pep8Dialog.__clearErrors" ID="Pep8Dialog.__clearErrors"></a> 162 </dl><a NAME="Pep8Dialog.__clearErrors" ID="Pep8Dialog.__clearErrors"></a>
136 <h4>Pep8Dialog.__clearErrors</h4> 163 <h4>Pep8Dialog.__clearErrors</h4>
137 <b>__clearErrors</b>(<i></i>) 164 <b>__clearErrors</b>(<i></i>)
138 <p> 165 <p>
139 Private method to clear all warning markers of open editors. 166 Private method to clear all warning markers of open editors.
140 </p><a NAME="Pep8Dialog.__createErrorItem" ID="Pep8Dialog.__createErrorItem"></a> 167 </p><a NAME="Pep8Dialog.__createResultItem" ID="Pep8Dialog.__createResultItem"></a>
141 <h4>Pep8Dialog.__createErrorItem</h4>
142 <b>__createErrorItem</b>(<i>file, line, pos, message</i>)
143 <p>
144 Private method to create an entry in the result list.
145 </p><dl>
146 <dt><i>file</i></dt>
147 <dd>
148 file name of the file (string)
149 </dd><dt><i>line</i></dt>
150 <dd>
151 line number of issue (integer or string)
152 </dd><dt><i>pos</i></dt>
153 <dd>
154 character position of issue (integer or string)
155 </dd><dt><i>message</i></dt>
156 <dd>
157 message text (string)
158 </dd><dt><i>fixed</i></dt>
159 <dd>
160 flag indicating a fixed issue (boolean)
161 </dd>
162 </dl><a NAME="Pep8Dialog.__createResultItem" ID="Pep8Dialog.__createResultItem"></a>
163 <h4>Pep8Dialog.__createResultItem</h4> 168 <h4>Pep8Dialog.__createResultItem</h4>
164 <b>__createResultItem</b>(<i>file, line, pos, message, fixed</i>) 169 <b>__createResultItem</b>(<i>file, line, pos, message, fixed</i>)
165 <p> 170 <p>
166 Private method to create an entry in the result list. 171 Private method to create an entry in the result list.
167 </p><dl> 172 </p><dl>
185 <h4>Pep8Dialog.__finish</h4> 190 <h4>Pep8Dialog.__finish</h4>
186 <b>__finish</b>(<i></i>) 191 <b>__finish</b>(<i></i>)
187 <p> 192 <p>
188 Private slot called when the PEP 8 check finished or the user 193 Private slot called when the PEP 8 check finished or the user
189 pressed the cancel button. 194 pressed the cancel button.
190 </p><a NAME="Pep8Dialog.__resetStatistics" ID="Pep8Dialog.__resetStatistics"></a> 195 </p><a NAME="Pep8Dialog.__getSelectedFixableItems" ID="Pep8Dialog.__getSelectedFixableItems"></a>
196 <h4>Pep8Dialog.__getSelectedFixableItems</h4>
197 <b>__getSelectedFixableItems</b>(<i></i>)
198 <p>
199 Private method to extract all selected items for fixable issues.
200 </p><dl>
201 <dt>Returns:</dt>
202 <dd>
203 selected items for fixable issues (list of QTreeWidgetItem)
204 </dd>
205 </dl><a NAME="Pep8Dialog.__itemFixable" ID="Pep8Dialog.__itemFixable"></a>
206 <h4>Pep8Dialog.__itemFixable</h4>
207 <b>__itemFixable</b>(<i>itm</i>)
208 <p>
209 Private method to check, if an item has a fixable issue.
210 </p><dl>
211 <dt><i>itm</i></dt>
212 <dd>
213 item to be checked (QTreeWidgetItem)
214 </dd>
215 </dl><dl>
216 <dt>Returns:</dt>
217 <dd>
218 flag indicating a fixable issue (boolean)
219 </dd>
220 </dl><a NAME="Pep8Dialog.__modifyFixedResultItem" ID="Pep8Dialog.__modifyFixedResultItem"></a>
221 <h4>Pep8Dialog.__modifyFixedResultItem</h4>
222 <b>__modifyFixedResultItem</b>(<i>itm, text</i>)
223 <p>
224 Private method to modify a result list entry to show its
225 positive fixed state.
226 </p><dl>
227 <dt><i>itm</i></dt>
228 <dd>
229 reference to the item to modify (QTreeWidgetItem)
230 </dd><dt><i>text</i></dt>
231 <dd>
232 text to be appended (string)
233 </dd>
234 </dl><a NAME="Pep8Dialog.__resetStatistics" ID="Pep8Dialog.__resetStatistics"></a>
191 <h4>Pep8Dialog.__resetStatistics</h4> 235 <h4>Pep8Dialog.__resetStatistics</h4>
192 <b>__resetStatistics</b>(<i></i>) 236 <b>__resetStatistics</b>(<i></i>)
193 <p> 237 <p>
194 Private slot to reset the statistics data. 238 Private slot to reset the statistics data.
195 </p><a NAME="Pep8Dialog.__resort" ID="Pep8Dialog.__resort"></a> 239 </p><a NAME="Pep8Dialog.__resort" ID="Pep8Dialog.__resort"></a>
196 <h4>Pep8Dialog.__resort</h4> 240 <h4>Pep8Dialog.__resort</h4>
197 <b>__resort</b>(<i></i>) 241 <b>__resort</b>(<i></i>)
198 <p> 242 <p>
199 Private method to resort the tree. 243 Private method to resort the tree.
200 </p><a NAME="Pep8Dialog.__updateStatistics" ID="Pep8Dialog.__updateStatistics"></a> 244 </p><a NAME="Pep8Dialog.__selectCodes" ID="Pep8Dialog.__selectCodes"></a>
245 <h4>Pep8Dialog.__selectCodes</h4>
246 <b>__selectCodes</b>(<i>edit, showFixCodes</i>)
247 <p>
248 Private method to select message codes via a selection dialog.
249 </p><dl>
250 <dt><i>edit</i></dt>
251 <dd>
252 reference of the line edit to be populated (QLineEdit)
253 </dd><dt><i>showFixCodes</i></dt>
254 <dd>
255 flag indicating to show a list of fixable
256 issues (boolean)
257 </dd>
258 </dl><a NAME="Pep8Dialog.__updateFixerStatistics" ID="Pep8Dialog.__updateFixerStatistics"></a>
259 <h4>Pep8Dialog.__updateFixerStatistics</h4>
260 <b>__updateFixerStatistics</b>(<i>fixer</i>)
261 <p>
262 Private method to update the collected fixer related statistics.
263 </p><dl>
264 <dt><i>fixer</i></dt>
265 <dd>
266 reference to the PEP 8 fixer (Pep8Fixer)
267 </dd>
268 </dl><a NAME="Pep8Dialog.__updateStatistics" ID="Pep8Dialog.__updateStatistics"></a>
201 <h4>Pep8Dialog.__updateStatistics</h4> 269 <h4>Pep8Dialog.__updateStatistics</h4>
202 <b>__updateStatistics</b>(<i>statistics, fixer</i>) 270 <b>__updateStatistics</b>(<i>statistics, fixer</i>)
203 <p> 271 <p>
204 Private method to update the collected statistics. 272 Private method to update the collected statistics.
205 </p><dl> 273 </p><dl>
225 <h4>Pep8Dialog.on_excludeMessagesSelectButton_clicked</h4> 293 <h4>Pep8Dialog.on_excludeMessagesSelectButton_clicked</h4>
226 <b>on_excludeMessagesSelectButton_clicked</b>(<i></i>) 294 <b>on_excludeMessagesSelectButton_clicked</b>(<i></i>)
227 <p> 295 <p>
228 Private slot to select the message codes to be excluded via a 296 Private slot to select the message codes to be excluded via a
229 selection dialog. 297 selection dialog.
298 </p><a NAME="Pep8Dialog.on_fixButton_clicked" ID="Pep8Dialog.on_fixButton_clicked"></a>
299 <h4>Pep8Dialog.on_fixButton_clicked</h4>
300 <b>on_fixButton_clicked</b>(<i></i>)
301 <p>
302 Private slot to fix selected issues.
230 </p><a NAME="Pep8Dialog.on_fixIssuesSelectButton_clicked" ID="Pep8Dialog.on_fixIssuesSelectButton_clicked"></a> 303 </p><a NAME="Pep8Dialog.on_fixIssuesSelectButton_clicked" ID="Pep8Dialog.on_fixIssuesSelectButton_clicked"></a>
231 <h4>Pep8Dialog.on_fixIssuesSelectButton_clicked</h4> 304 <h4>Pep8Dialog.on_fixIssuesSelectButton_clicked</h4>
232 <b>on_fixIssuesSelectButton_clicked</b>(<i></i>) 305 <b>on_fixIssuesSelectButton_clicked</b>(<i></i>)
233 <p> 306 <p>
234 Private slot to select the issue codes to be fixed via a 307 Private slot to select the issue codes to be fixed via a
242 </p><a NAME="Pep8Dialog.on_loadDefaultButton_clicked" ID="Pep8Dialog.on_loadDefaultButton_clicked"></a> 315 </p><a NAME="Pep8Dialog.on_loadDefaultButton_clicked" ID="Pep8Dialog.on_loadDefaultButton_clicked"></a>
243 <h4>Pep8Dialog.on_loadDefaultButton_clicked</h4> 316 <h4>Pep8Dialog.on_loadDefaultButton_clicked</h4>
244 <b>on_loadDefaultButton_clicked</b>(<i></i>) 317 <b>on_loadDefaultButton_clicked</b>(<i></i>)
245 <p> 318 <p>
246 Private slot to load the default configuration values. 319 Private slot to load the default configuration values.
320 </p><a NAME="Pep8Dialog.on_noFixIssuesSelectButton_clicked" ID="Pep8Dialog.on_noFixIssuesSelectButton_clicked"></a>
321 <h4>Pep8Dialog.on_noFixIssuesSelectButton_clicked</h4>
322 <b>on_noFixIssuesSelectButton_clicked</b>(<i></i>)
323 <p>
324 Private slot to select the issue codes not to be fixed via a
325 selection dialog.
326 </p><a NAME="Pep8Dialog.on_resetDefaultButton_clicked" ID="Pep8Dialog.on_resetDefaultButton_clicked"></a>
327 <h4>Pep8Dialog.on_resetDefaultButton_clicked</h4>
328 <b>on_resetDefaultButton_clicked</b>(<i></i>)
329 <p>
330 Slot documentation goes here.
247 </p><a NAME="Pep8Dialog.on_resultList_itemActivated" ID="Pep8Dialog.on_resultList_itemActivated"></a> 331 </p><a NAME="Pep8Dialog.on_resultList_itemActivated" ID="Pep8Dialog.on_resultList_itemActivated"></a>
248 <h4>Pep8Dialog.on_resultList_itemActivated</h4> 332 <h4>Pep8Dialog.on_resultList_itemActivated</h4>
249 <b>on_resultList_itemActivated</b>(<i>item, column</i>) 333 <b>on_resultList_itemActivated</b>(<i>item, column</i>)
250 <p> 334 <p>
251 Private slot to handle the activation of an item. 335 Private slot to handle the activation of an item.
255 reference to the activated item (QTreeWidgetItem) 339 reference to the activated item (QTreeWidgetItem)
256 </dd><dt><i>column</i></dt> 340 </dd><dt><i>column</i></dt>
257 <dd> 341 <dd>
258 column the item was activated in (integer) 342 column the item was activated in (integer)
259 </dd> 343 </dd>
260 </dl><a NAME="Pep8Dialog.on_showButton_clicked" ID="Pep8Dialog.on_showButton_clicked"></a> 344 </dl><a NAME="Pep8Dialog.on_resultList_itemSelectionChanged" ID="Pep8Dialog.on_resultList_itemSelectionChanged"></a>
345 <h4>Pep8Dialog.on_resultList_itemSelectionChanged</h4>
346 <b>on_resultList_itemSelectionChanged</b>(<i></i>)
347 <p>
348 Private slot to change the dialog state depending on the selection.
349 </p><a NAME="Pep8Dialog.on_showButton_clicked" ID="Pep8Dialog.on_showButton_clicked"></a>
261 <h4>Pep8Dialog.on_showButton_clicked</h4> 350 <h4>Pep8Dialog.on_showButton_clicked</h4>
262 <b>on_showButton_clicked</b>(<i></i>) 351 <b>on_showButton_clicked</b>(<i></i>)
263 <p> 352 <p>
264 Private slot to handle the "Show" button press. 353 Private slot to handle the "Show" button press.
265 </p><a NAME="Pep8Dialog.on_startButton_clicked" ID="Pep8Dialog.on_startButton_clicked"></a> 354 </p><a NAME="Pep8Dialog.on_startButton_clicked" ID="Pep8Dialog.on_startButton_clicked"></a>
310 state of the repeat check box if it is not None 399 state of the repeat check box if it is not None
311 (None or boolean) 400 (None or boolean)
312 </dd> 401 </dd>
313 </dl> 402 </dl>
314 <div align="right"><a href="#top">Up</a></div> 403 <div align="right"><a href="#top">Up</a></div>
404 <hr /><hr />
405 <a NAME="Pep8Report" ID="Pep8Report"></a>
406 <h2>Pep8Report</h2>
407 <p>
408 Class implementing a special report to be used with our dialog.
409 </p>
410 <h3>Derived from</h3>
411 pep8.BaseReport
412 <h3>Class Attributes</h3>
413 <table>
414 <tr><td>None</td></tr>
415 </table>
416 <h3>Class Methods</h3>
417 <table>
418 <tr><td>None</td></tr>
419 </table>
420 <h3>Methods</h3>
421 <table>
422 <tr>
423 <td><a href="#Pep8Report.__init__">Pep8Report</a></td>
424 <td>Constructor</td>
425 </tr><tr>
426 <td><a href="#Pep8Report.error_args">error_args</a></td>
427 <td>Public method to collect the error messages.</td>
428 </tr>
429 </table>
430 <h3>Static Methods</h3>
431 <table>
432 <tr><td>None</td></tr>
433 </table>
434 <a NAME="Pep8Report.__init__" ID="Pep8Report.__init__"></a>
435 <h4>Pep8Report (Constructor)</h4>
436 <b>Pep8Report</b>(<i>options</i>)
437 <p>
438 Constructor
439 </p><dl>
440 <dt><i>options</i></dt>
441 <dd>
442 options for the report (optparse.Values)
443 </dd>
444 </dl><a NAME="Pep8Report.error_args" ID="Pep8Report.error_args"></a>
445 <h4>Pep8Report.error_args</h4>
446 <b>error_args</b>(<i>line_number, offset, code, check, *args</i>)
447 <p>
448 Public method to collect the error messages.
449 </p><dl>
450 <dt><i>line_number</i></dt>
451 <dd>
452 line number of the issue (integer)
453 </dd><dt><i>offset</i></dt>
454 <dd>
455 position within line of the issue (integer)
456 </dd><dt><i>code</i></dt>
457 <dd>
458 message code (string)
459 </dd><dt><i>check</i></dt>
460 <dd>
461 reference to the checker function (function)
462 </dd><dt><i>args</i></dt>
463 <dd>
464 arguments for the message (list)
465 </dd>
466 </dl>
467 <div align="right"><a href="#top">Up</a></div>
315 <hr /> 468 <hr />
316 </body></html> 469 </body></html>

eric ide

mercurial