5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.CodeFormatting.BlackFormattingDialog</h1> |
9 <h1>eric7.CodeFormatting.BlackFormattingDialog</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing a dialog showing the Black code formatting progress and the results. |
11 Module implementing a dialog showing the Black code formatting progress and the results. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
15 <table> |
16 <table> |
16 <tr><td>None</td></tr> |
17 <tr><td>None</td></tr> |
17 </table> |
18 </table> |
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#BlackFormattingDialog">BlackFormattingDialog</a></td> |
22 <td><a href="#BlackFormattingDialog">BlackFormattingDialog</a></td> |
25 <td>Class implementing a dialog showing the Black code formatting progress and the results.</td> |
23 <td>Class implementing a dialog showing the Black code formatting progress and the results.</td> |
26 </tr> |
24 </tr> |
27 <tr> |
25 <tr> |
39 <tr> |
37 <tr> |
40 <td><a href="#BlackStatistics">BlackStatistics</a></td> |
38 <td><a href="#BlackStatistics">BlackStatistics</a></td> |
41 <td>Class containing the reformatting statistic data.</td> |
39 <td>Class containing the reformatting statistic data.</td> |
42 </tr> |
40 </tr> |
43 </table> |
41 </table> |
|
42 |
44 <h3>Functions</h3> |
43 <h3>Functions</h3> |
45 |
44 <table> |
46 <table> |
45 <tr><td>None</td></tr> |
47 <tr><td>None</td></tr> |
46 </table> |
48 </table> |
47 |
49 <hr /> |
48 <hr /> |
50 <hr /> |
49 <hr /> |
51 <a NAME="BlackFormattingDialog" ID="BlackFormattingDialog"></a> |
50 <a NAME="BlackFormattingDialog" ID="BlackFormattingDialog"></a> |
52 <h2>BlackFormattingDialog</h2> |
51 <h2>BlackFormattingDialog</h2> |
53 |
|
54 <p> |
52 <p> |
55 Class implementing a dialog showing the Black code formatting progress and the |
53 Class implementing a dialog showing the Black code formatting progress and the |
56 results. |
54 results. |
57 </p> |
55 </p> |
|
56 |
58 <h3>Derived from</h3> |
57 <h3>Derived from</h3> |
59 QDialog, Ui_BlackFormattingDialog |
58 QDialog, Ui_BlackFormattingDialog |
60 <h3>Class Attributes</h3> |
59 <h3>Class Attributes</h3> |
61 |
60 <table> |
62 <table> |
61 <tr><td>DataRole</td></tr> |
63 <tr><td>DataRole</td></tr><tr><td>DataTypeRole</td></tr><tr><td>FileNameColumn</td></tr><tr><td>FileNameRole</td></tr><tr><td>StatusColumn</td></tr><tr><td>StatusRole</td></tr> |
62 <tr><td>DataTypeRole</td></tr> |
64 </table> |
63 <tr><td>FileNameColumn</td></tr> |
|
64 <tr><td>FileNameRole</td></tr> |
|
65 <tr><td>StatusColumn</td></tr> |
|
66 <tr><td>StatusRole</td></tr> |
|
67 </table> |
|
68 |
65 <h3>Class Methods</h3> |
69 <h3>Class Methods</h3> |
66 |
70 <table> |
67 <table> |
71 <tr><td>None</td></tr> |
68 <tr><td>None</td></tr> |
72 </table> |
69 </table> |
73 |
70 <h3>Methods</h3> |
74 <h3>Methods</h3> |
71 |
75 <table> |
72 <table> |
|
73 |
|
74 <tr> |
76 <tr> |
75 <td><a href="#BlackFormattingDialog.__init__">BlackFormattingDialog</a></td> |
77 <td><a href="#BlackFormattingDialog.__init__">BlackFormattingDialog</a></td> |
76 <td>Constructor</td> |
78 <td>Constructor</td> |
77 </tr> |
79 </tr> |
78 <tr> |
80 <tr> |
134 <tr> |
136 <tr> |
135 <td><a href="#BlackFormattingDialog.on_statusFilterComboBox_currentTextChanged">on_statusFilterComboBox_currentTextChanged</a></td> |
137 <td><a href="#BlackFormattingDialog.on_statusFilterComboBox_currentTextChanged">on_statusFilterComboBox_currentTextChanged</a></td> |
136 <td>Private slot handling the selection of a status for items to be shown.</td> |
138 <td>Private slot handling the selection of a status for items to be shown.</td> |
137 </tr> |
139 </tr> |
138 </table> |
140 </table> |
|
141 |
139 <h3>Static Methods</h3> |
142 <h3>Static Methods</h3> |
140 |
143 <table> |
141 <table> |
|
142 |
|
143 <tr> |
144 <tr> |
144 <td><a href="#BlackFormattingDialog.__diffFormatFile">__diffFormatFile</a></td> |
145 <td><a href="#BlackFormattingDialog.__diffFormatFile">__diffFormatFile</a></td> |
145 <td>Static method to check, if the given files need to be reformatted, and generate a unified diff.</td> |
146 <td>Static method to check, if the given files need to be reformatted, and generate a unified diff.</td> |
146 </tr> |
147 </tr> |
147 <tr> |
148 <tr> |
148 <td><a href="#BlackFormattingDialog.formattingWorkerTask">formattingWorkerTask</a></td> |
149 <td><a href="#BlackFormattingDialog.formattingWorkerTask">formattingWorkerTask</a></td> |
149 <td>Static method acting as the parallel worker for the formatting task.</td> |
150 <td>Static method acting as the parallel worker for the formatting task.</td> |
150 </tr> |
151 </tr> |
151 </table> |
152 </table> |
|
153 |
152 |
154 |
153 <a NAME="BlackFormattingDialog.__init__" ID="BlackFormattingDialog.__init__"></a> |
155 <a NAME="BlackFormattingDialog.__init__" ID="BlackFormattingDialog.__init__"></a> |
154 <h4>BlackFormattingDialog (Constructor)</h4> |
156 <h4>BlackFormattingDialog (Constructor)</h4> |
155 <b>BlackFormattingDialog</b>(<i>configuration, filesList, project=None, action=BlackFormattingAction.Format, parent=None, </i>) |
157 <b>BlackFormattingDialog</b>(<i>configuration, filesList, project=None, action=BlackFormattingAction.Format, parent=None, </i>) |
156 |
|
157 <p> |
158 <p> |
158 Constructor |
159 Constructor |
159 </p> |
160 </p> |
|
161 |
160 <dl> |
162 <dl> |
161 |
163 |
162 <dt><i>configuration</i> (dict)</dt> |
164 <dt><i>configuration</i> (dict)</dt> |
163 <dd> |
165 <dd> |
164 dictionary containing the configuration parameters |
166 dictionary containing the configuration parameters |
208 </dd> |
210 </dd> |
209 </dl> |
211 </dl> |
210 <a NAME="BlackFormattingDialog.__finish" ID="BlackFormattingDialog.__finish"></a> |
212 <a NAME="BlackFormattingDialog.__finish" ID="BlackFormattingDialog.__finish"></a> |
211 <h4>BlackFormattingDialog.__finish</h4> |
213 <h4>BlackFormattingDialog.__finish</h4> |
212 <b>__finish</b>(<i></i>) |
214 <b>__finish</b>(<i></i>) |
213 |
|
214 <p> |
215 <p> |
215 Private method to perform some actions after the run was performed or canceled. |
216 Private method to perform some actions after the run was performed or canceled. |
216 </p> |
217 </p> |
|
218 |
217 <a NAME="BlackFormattingDialog.__formatButtonClicked" ID="BlackFormattingDialog.__formatButtonClicked"></a> |
219 <a NAME="BlackFormattingDialog.__formatButtonClicked" ID="BlackFormattingDialog.__formatButtonClicked"></a> |
218 <h4>BlackFormattingDialog.__formatButtonClicked</h4> |
220 <h4>BlackFormattingDialog.__formatButtonClicked</h4> |
219 <b>__formatButtonClicked</b>(<i></i>) |
221 <b>__formatButtonClicked</b>(<i></i>) |
220 |
|
221 <p> |
222 <p> |
222 Private slot handling the selection of the 'Format Code' button. |
223 Private slot handling the selection of the 'Format Code' button. |
223 </p> |
224 </p> |
|
225 |
224 <a NAME="BlackFormattingDialog.__formatManyFiles" ID="BlackFormattingDialog.__formatManyFiles"></a> |
226 <a NAME="BlackFormattingDialog.__formatManyFiles" ID="BlackFormattingDialog.__formatManyFiles"></a> |
225 <h4>BlackFormattingDialog.__formatManyFiles</h4> |
227 <h4>BlackFormattingDialog.__formatManyFiles</h4> |
226 <b>__formatManyFiles</b>(<i>files</i>) |
228 <b>__formatManyFiles</b>(<i>files</i>) |
227 |
|
228 <p> |
229 <p> |
229 Private method to format the list of files according the configuration using |
230 Private method to format the list of files according the configuration using |
230 multiple processes in parallel. |
231 multiple processes in parallel. |
231 </p> |
232 </p> |
|
233 |
232 <dl> |
234 <dl> |
233 |
235 |
234 <dt><i>files</i> (list of str)</dt> |
236 <dt><i>files</i> (list of str)</dt> |
235 <dd> |
237 <dd> |
236 list of files to be processed |
238 list of files to be processed |
237 </dd> |
239 </dd> |
238 </dl> |
240 </dl> |
239 <a NAME="BlackFormattingDialog.__formatOneFile" ID="BlackFormattingDialog.__formatOneFile"></a> |
241 <a NAME="BlackFormattingDialog.__formatOneFile" ID="BlackFormattingDialog.__formatOneFile"></a> |
240 <h4>BlackFormattingDialog.__formatOneFile</h4> |
242 <h4>BlackFormattingDialog.__formatOneFile</h4> |
241 <b>__formatOneFile</b>(<i>file</i>) |
243 <b>__formatOneFile</b>(<i>file</i>) |
242 |
|
243 <p> |
244 <p> |
244 Private method to format the list of files according the configuration. |
245 Private method to format the list of files according the configuration. |
245 </p> |
246 </p> |
|
247 |
246 <dl> |
248 <dl> |
247 |
249 |
248 <dt><i>file</i> (str)</dt> |
250 <dt><i>file</i> (str)</dt> |
249 <dd> |
251 <dd> |
250 name of the file to be processed |
252 name of the file to be processed |
251 </dd> |
253 </dd> |
252 </dl> |
254 </dl> |
253 <a NAME="BlackFormattingDialog.__handleBlackFormattingResult" ID="BlackFormattingDialog.__handleBlackFormattingResult"></a> |
255 <a NAME="BlackFormattingDialog.__handleBlackFormattingResult" ID="BlackFormattingDialog.__handleBlackFormattingResult"></a> |
254 <h4>BlackFormattingDialog.__handleBlackFormattingResult</h4> |
256 <h4>BlackFormattingDialog.__handleBlackFormattingResult</h4> |
255 <b>__handleBlackFormattingResult</b>(<i>status, filename, data</i>) |
257 <b>__handleBlackFormattingResult</b>(<i>status, filename, data</i>) |
256 |
|
257 <p> |
258 <p> |
258 Private slot to handle the result of a black reformatting action. |
259 Private slot to handle the result of a black reformatting action. |
259 </p> |
260 </p> |
|
261 |
260 <dl> |
262 <dl> |
261 |
263 |
262 <dt><i>status</i> (str)</dt> |
264 <dt><i>status</i> (str)</dt> |
263 <dd> |
265 <dd> |
264 status of the performed action (one of 'changed', 'failed', |
266 status of the performed action (one of 'changed', 'failed', |
274 </dd> |
276 </dd> |
275 </dl> |
277 </dl> |
276 <a NAME="BlackFormattingDialog.__performAction" ID="BlackFormattingDialog.__performAction"></a> |
278 <a NAME="BlackFormattingDialog.__performAction" ID="BlackFormattingDialog.__performAction"></a> |
277 <h4>BlackFormattingDialog.__performAction</h4> |
279 <h4>BlackFormattingDialog.__performAction</h4> |
278 <b>__performAction</b>(<i></i>) |
280 <b>__performAction</b>(<i></i>) |
279 |
|
280 <p> |
281 <p> |
281 Private method to execute the requested formatting action. |
282 Private method to execute the requested formatting action. |
282 </p> |
283 </p> |
|
284 |
283 <a NAME="BlackFormattingDialog.__populateStatusFilterCombo" ID="BlackFormattingDialog.__populateStatusFilterCombo"></a> |
285 <a NAME="BlackFormattingDialog.__populateStatusFilterCombo" ID="BlackFormattingDialog.__populateStatusFilterCombo"></a> |
284 <h4>BlackFormattingDialog.__populateStatusFilterCombo</h4> |
286 <h4>BlackFormattingDialog.__populateStatusFilterCombo</h4> |
285 <b>__populateStatusFilterCombo</b>(<i></i>) |
287 <b>__populateStatusFilterCombo</b>(<i></i>) |
286 |
|
287 <p> |
288 <p> |
288 Private method to populate the status filter combo box with allowed selections. |
289 Private method to populate the status filter combo box with allowed selections. |
289 </p> |
290 </p> |
|
291 |
290 <a NAME="BlackFormattingDialog.__resizeColumns" ID="BlackFormattingDialog.__resizeColumns"></a> |
292 <a NAME="BlackFormattingDialog.__resizeColumns" ID="BlackFormattingDialog.__resizeColumns"></a> |
291 <h4>BlackFormattingDialog.__resizeColumns</h4> |
293 <h4>BlackFormattingDialog.__resizeColumns</h4> |
292 <b>__resizeColumns</b>(<i></i>) |
294 <b>__resizeColumns</b>(<i></i>) |
293 |
|
294 <p> |
295 <p> |
295 Private method to resize the columns of the result list. |
296 Private method to resize the columns of the result list. |
296 </p> |
297 </p> |
|
298 |
297 <a NAME="BlackFormattingDialog.__resort" ID="BlackFormattingDialog.__resort"></a> |
299 <a NAME="BlackFormattingDialog.__resort" ID="BlackFormattingDialog.__resort"></a> |
298 <h4>BlackFormattingDialog.__resort</h4> |
300 <h4>BlackFormattingDialog.__resort</h4> |
299 <b>__resort</b>(<i></i>) |
301 <b>__resort</b>(<i></i>) |
300 |
|
301 <p> |
302 <p> |
302 Private method to resort the result list. |
303 Private method to resort the result list. |
303 </p> |
304 </p> |
|
305 |
304 <a NAME="BlackFormattingDialog.__updateStatistics" ID="BlackFormattingDialog.__updateStatistics"></a> |
306 <a NAME="BlackFormattingDialog.__updateStatistics" ID="BlackFormattingDialog.__updateStatistics"></a> |
305 <h4>BlackFormattingDialog.__updateStatistics</h4> |
307 <h4>BlackFormattingDialog.__updateStatistics</h4> |
306 <b>__updateStatistics</b>(<i></i>) |
308 <b>__updateStatistics</b>(<i></i>) |
307 |
|
308 <p> |
309 <p> |
309 Private method to update the statistics about the recent formatting run and |
310 Private method to update the statistics about the recent formatting run and |
310 make them visible. |
311 make them visible. |
311 </p> |
312 </p> |
|
313 |
312 <a NAME="BlackFormattingDialog.closeEvent" ID="BlackFormattingDialog.closeEvent"></a> |
314 <a NAME="BlackFormattingDialog.closeEvent" ID="BlackFormattingDialog.closeEvent"></a> |
313 <h4>BlackFormattingDialog.closeEvent</h4> |
315 <h4>BlackFormattingDialog.closeEvent</h4> |
314 <b>closeEvent</b>(<i>evt</i>) |
316 <b>closeEvent</b>(<i>evt</i>) |
315 |
|
316 <p> |
317 <p> |
317 Protected slot implementing a close event handler. |
318 Protected slot implementing a close event handler. |
318 </p> |
319 </p> |
|
320 |
319 <dl> |
321 <dl> |
320 |
322 |
321 <dt><i>evt</i> (QCloseEvent)</dt> |
323 <dt><i>evt</i> (QCloseEvent)</dt> |
322 <dd> |
324 <dd> |
323 reference to the close event |
325 reference to the close event |
324 </dd> |
326 </dd> |
325 </dl> |
327 </dl> |
326 <a NAME="BlackFormattingDialog.on_buttonBox_clicked" ID="BlackFormattingDialog.on_buttonBox_clicked"></a> |
328 <a NAME="BlackFormattingDialog.on_buttonBox_clicked" ID="BlackFormattingDialog.on_buttonBox_clicked"></a> |
327 <h4>BlackFormattingDialog.on_buttonBox_clicked</h4> |
329 <h4>BlackFormattingDialog.on_buttonBox_clicked</h4> |
328 <b>on_buttonBox_clicked</b>(<i>button</i>) |
330 <b>on_buttonBox_clicked</b>(<i>button</i>) |
329 |
|
330 <p> |
331 <p> |
331 Private slot to handle button presses of the dialog buttons. |
332 Private slot to handle button presses of the dialog buttons. |
332 </p> |
333 </p> |
|
334 |
333 <dl> |
335 <dl> |
334 |
336 |
335 <dt><i>button</i> (QAbstractButton)</dt> |
337 <dt><i>button</i> (QAbstractButton)</dt> |
336 <dd> |
338 <dd> |
337 reference to the pressed button |
339 reference to the pressed button |
338 </dd> |
340 </dd> |
339 </dl> |
341 </dl> |
340 <a NAME="BlackFormattingDialog.on_resultsList_itemDoubleClicked" ID="BlackFormattingDialog.on_resultsList_itemDoubleClicked"></a> |
342 <a NAME="BlackFormattingDialog.on_resultsList_itemDoubleClicked" ID="BlackFormattingDialog.on_resultsList_itemDoubleClicked"></a> |
341 <h4>BlackFormattingDialog.on_resultsList_itemDoubleClicked</h4> |
343 <h4>BlackFormattingDialog.on_resultsList_itemDoubleClicked</h4> |
342 <b>on_resultsList_itemDoubleClicked</b>(<i>item, column</i>) |
344 <b>on_resultsList_itemDoubleClicked</b>(<i>item, column</i>) |
343 |
|
344 <p> |
345 <p> |
345 Private slot handling a double click of a result item. |
346 Private slot handling a double click of a result item. |
346 </p> |
347 </p> |
|
348 |
347 <dl> |
349 <dl> |
348 |
350 |
349 <dt><i>item</i> (QTreeWidgetItem)</dt> |
351 <dt><i>item</i> (QTreeWidgetItem)</dt> |
350 <dd> |
352 <dd> |
351 reference to the double clicked item |
353 reference to the double clicked item |
356 </dd> |
358 </dd> |
357 </dl> |
359 </dl> |
358 <a NAME="BlackFormattingDialog.on_statusFilterComboBox_currentTextChanged" ID="BlackFormattingDialog.on_statusFilterComboBox_currentTextChanged"></a> |
360 <a NAME="BlackFormattingDialog.on_statusFilterComboBox_currentTextChanged" ID="BlackFormattingDialog.on_statusFilterComboBox_currentTextChanged"></a> |
359 <h4>BlackFormattingDialog.on_statusFilterComboBox_currentTextChanged</h4> |
361 <h4>BlackFormattingDialog.on_statusFilterComboBox_currentTextChanged</h4> |
360 <b>on_statusFilterComboBox_currentTextChanged</b>(<i>status</i>) |
362 <b>on_statusFilterComboBox_currentTextChanged</b>(<i>status</i>) |
361 |
|
362 <p> |
363 <p> |
363 Private slot handling the selection of a status for items to be shown. |
364 Private slot handling the selection of a status for items to be shown. |
364 </p> |
365 </p> |
|
366 |
365 <dl> |
367 <dl> |
366 |
368 |
367 <dt><i>status</i> (str)</dt> |
369 <dt><i>status</i> (str)</dt> |
368 <dd> |
370 <dd> |
369 selected status |
371 selected status |
370 </dd> |
372 </dd> |
371 </dl> |
373 </dl> |
372 <a NAME="BlackFormattingDialog.__diffFormatFile" ID="BlackFormattingDialog.__diffFormatFile"></a> |
374 <a NAME="BlackFormattingDialog.__diffFormatFile" ID="BlackFormattingDialog.__diffFormatFile"></a> |
373 <h4>BlackFormattingDialog.__diffFormatFile (static)</h4> |
375 <h4>BlackFormattingDialog.__diffFormatFile (static)</h4> |
374 <b>__diffFormatFile</b>(<i>fast, mode, report, relSrc=""</i>) |
376 <b>__diffFormatFile</b>(<i>fast, mode, report, relSrc=""</i>) |
375 |
|
376 <p> |
377 <p> |
377 Static method to check, if the given files need to be reformatted, and generate |
378 Static method to check, if the given files need to be reformatted, and generate |
378 a unified diff. |
379 a unified diff. |
379 </p> |
380 </p> |
|
381 |
380 <dl> |
382 <dl> |
381 |
383 |
382 <dt><i>src</i> (pathlib.Path)</dt> |
384 <dt><i>src</i> (pathlib.Path)</dt> |
383 <dd> |
385 <dd> |
384 path of file to be checked |
386 path of file to be checked |
425 <div align="right"><a href="#top">Up</a></div> |
427 <div align="right"><a href="#top">Up</a></div> |
426 <hr /> |
428 <hr /> |
427 <hr /> |
429 <hr /> |
428 <a NAME="BlackMultiprocessingReport" ID="BlackMultiprocessingReport"></a> |
430 <a NAME="BlackMultiprocessingReport" ID="BlackMultiprocessingReport"></a> |
429 <h2>BlackMultiprocessingReport</h2> |
431 <h2>BlackMultiprocessingReport</h2> |
430 |
|
431 <p> |
432 <p> |
432 Class extending the black Report to work with multiprocessing. |
433 Class extending the black Report to work with multiprocessing. |
433 </p> |
434 </p> |
|
435 |
434 <h3>Derived from</h3> |
436 <h3>Derived from</h3> |
435 black.Report |
437 black.Report |
436 <h3>Class Attributes</h3> |
438 <h3>Class Attributes</h3> |
437 |
439 <table> |
438 <table> |
440 <tr><td>None</td></tr> |
439 <tr><td>None</td></tr> |
441 </table> |
440 </table> |
442 |
441 <h3>Class Methods</h3> |
443 <h3>Class Methods</h3> |
442 |
444 <table> |
443 <table> |
445 <tr><td>None</td></tr> |
444 <tr><td>None</td></tr> |
446 </table> |
445 </table> |
447 |
446 <h3>Methods</h3> |
448 <h3>Methods</h3> |
447 |
449 <table> |
448 <table> |
|
449 |
|
450 <tr> |
450 <tr> |
451 <td><a href="#BlackMultiprocessingReport.__init__">BlackMultiprocessingReport</a></td> |
451 <td><a href="#BlackMultiprocessingReport.__init__">BlackMultiprocessingReport</a></td> |
452 <td>Constructor</td> |
452 <td>Constructor</td> |
453 </tr> |
453 </tr> |
454 <tr> |
454 <tr> |
462 <tr> |
462 <tr> |
463 <td><a href="#BlackMultiprocessingReport.path_ignored">path_ignored</a></td> |
463 <td><a href="#BlackMultiprocessingReport.path_ignored">path_ignored</a></td> |
464 <td>Public method handling an ignored path.</td> |
464 <td>Public method handling an ignored path.</td> |
465 </tr> |
465 </tr> |
466 </table> |
466 </table> |
|
467 |
467 <h3>Static Methods</h3> |
468 <h3>Static Methods</h3> |
468 |
469 <table> |
469 <table> |
470 <tr><td>None</td></tr> |
470 <tr><td>None</td></tr> |
471 </table> |
471 </table> |
472 |
472 |
473 |
473 <a NAME="BlackMultiprocessingReport.__init__" ID="BlackMultiprocessingReport.__init__"></a> |
474 <a NAME="BlackMultiprocessingReport.__init__" ID="BlackMultiprocessingReport.__init__"></a> |
474 <h4>BlackMultiprocessingReport (Constructor)</h4> |
475 <h4>BlackMultiprocessingReport (Constructor)</h4> |
475 <b>BlackMultiprocessingReport</b>(<i>resultQueue</i>) |
476 <b>BlackMultiprocessingReport</b>(<i>resultQueue</i>) |
476 |
|
477 <p> |
477 <p> |
478 Constructor |
478 Constructor |
479 </p> |
479 </p> |
|
480 |
480 <dl> |
481 <dl> |
481 |
482 |
482 <dt><i>resultQueue</i> (multiprocessing.Queue)</dt> |
483 <dt><i>resultQueue</i> (multiprocessing.Queue)</dt> |
483 <dd> |
484 <dd> |
484 reference to the queue to put the results into |
485 reference to the queue to put the results into |
485 </dd> |
486 </dd> |
486 </dl> |
487 </dl> |
487 <a NAME="BlackMultiprocessingReport.done" ID="BlackMultiprocessingReport.done"></a> |
488 <a NAME="BlackMultiprocessingReport.done" ID="BlackMultiprocessingReport.done"></a> |
488 <h4>BlackMultiprocessingReport.done</h4> |
489 <h4>BlackMultiprocessingReport.done</h4> |
489 <b>done</b>(<i>src, changed, diff=""</i>) |
490 <b>done</b>(<i>src, changed, diff=""</i>) |
490 |
|
491 <p> |
491 <p> |
492 Public method to handle the end of a reformat. |
492 Public method to handle the end of a reformat. |
493 </p> |
493 </p> |
|
494 |
494 <dl> |
495 <dl> |
495 |
496 |
496 <dt><i>src</i> (pathlib.Path)</dt> |
497 <dt><i>src</i> (pathlib.Path)</dt> |
497 <dd> |
498 <dd> |
498 name of the processed file |
499 name of the processed file |
545 <div align="right"><a href="#top">Up</a></div> |
546 <div align="right"><a href="#top">Up</a></div> |
546 <hr /> |
547 <hr /> |
547 <hr /> |
548 <hr /> |
548 <a NAME="BlackMultiprocessingResult" ID="BlackMultiprocessingResult"></a> |
549 <a NAME="BlackMultiprocessingResult" ID="BlackMultiprocessingResult"></a> |
549 <h2>BlackMultiprocessingResult</h2> |
550 <h2>BlackMultiprocessingResult</h2> |
550 |
|
551 <p> |
551 <p> |
552 Class containing the reformatting result data. |
552 Class containing the reformatting result data. |
553 </p> |
553 </p> |
554 <p> |
554 <p> |
555 This class is used when reformatting multiple files in parallel using processes. |
555 This class is used when reformatting multiple files in parallel using processes. |
556 </p> |
556 </p> |
|
557 |
557 <h3>Derived from</h3> |
558 <h3>Derived from</h3> |
558 None |
559 None |
559 <h3>Class Attributes</h3> |
560 <h3>Class Attributes</h3> |
560 |
561 <table> |
561 <table> |
562 <tr><td>data</td></tr> |
562 <tr><td>data</td></tr><tr><td>filename</td></tr><tr><td>status</td></tr> |
563 <tr><td>filename</td></tr> |
563 </table> |
564 <tr><td>status</td></tr> |
|
565 </table> |
|
566 |
564 <h3>Class Methods</h3> |
567 <h3>Class Methods</h3> |
565 |
568 <table> |
566 <table> |
569 <tr><td>None</td></tr> |
567 <tr><td>None</td></tr> |
570 </table> |
568 </table> |
571 |
569 <h3>Methods</h3> |
572 <h3>Methods</h3> |
570 |
573 <table> |
571 <table> |
574 <tr><td>None</td></tr> |
572 <tr><td>None</td></tr> |
575 </table> |
573 </table> |
576 |
574 <h3>Static Methods</h3> |
577 <h3>Static Methods</h3> |
575 |
578 <table> |
576 <table> |
579 <tr><td>None</td></tr> |
577 <tr><td>None</td></tr> |
580 </table> |
578 </table> |
581 |
579 |
582 |
580 <div align="right"><a href="#top">Up</a></div> |
583 <div align="right"><a href="#top">Up</a></div> |
581 <hr /> |
584 <hr /> |
582 <hr /> |
585 <hr /> |
583 <a NAME="BlackReport" ID="BlackReport"></a> |
586 <a NAME="BlackReport" ID="BlackReport"></a> |
584 <h2>BlackReport</h2> |
587 <h2>BlackReport</h2> |
585 |
|
586 <p> |
588 <p> |
587 Class extending the black Report to work with our dialog. |
589 Class extending the black Report to work with our dialog. |
588 </p> |
590 </p> |
|
591 |
589 <h3>Signals</h3> |
592 <h3>Signals</h3> |
590 <dl> |
593 <dl> |
591 |
594 |
592 <dt>result(status, file name, data)</dt> |
595 <dt>result(status, file name, data)</dt> |
593 <dd> |
596 <dd> |
627 <tr> |
628 <tr> |
628 <td><a href="#BlackReport.path_ignored">path_ignored</a></td> |
629 <td><a href="#BlackReport.path_ignored">path_ignored</a></td> |
629 <td>Public method handling an ignored path.</td> |
630 <td>Public method handling an ignored path.</td> |
630 </tr> |
631 </tr> |
631 </table> |
632 </table> |
|
633 |
632 <h3>Static Methods</h3> |
634 <h3>Static Methods</h3> |
633 |
635 <table> |
634 <table> |
636 <tr><td>None</td></tr> |
635 <tr><td>None</td></tr> |
637 </table> |
636 </table> |
638 |
637 |
639 |
638 <a NAME="BlackReport.__init__" ID="BlackReport.__init__"></a> |
640 <a NAME="BlackReport.__init__" ID="BlackReport.__init__"></a> |
639 <h4>BlackReport (Constructor)</h4> |
641 <h4>BlackReport (Constructor)</h4> |
640 <b>BlackReport</b>(<i>parent=None</i>) |
642 <b>BlackReport</b>(<i>parent=None</i>) |
641 |
|
642 <p> |
643 <p> |
643 Constructor |
644 Constructor |
644 </p> |
645 </p> |
|
646 |
645 <dl> |
647 <dl> |
646 |
648 |
647 <dt><i>parent</i> (QObject (optional))</dt> |
649 <dt><i>parent</i> (QObject (optional))</dt> |
648 <dd> |
650 <dd> |
649 reference to the parent object (defaults to None |
651 reference to the parent object (defaults to None |
650 </dd> |
652 </dd> |
651 </dl> |
653 </dl> |
652 <a NAME="BlackReport.done" ID="BlackReport.done"></a> |
654 <a NAME="BlackReport.done" ID="BlackReport.done"></a> |
653 <h4>BlackReport.done</h4> |
655 <h4>BlackReport.done</h4> |
654 <b>done</b>(<i>src, changed, diff=""</i>) |
656 <b>done</b>(<i>src, changed, diff=""</i>) |
655 |
|
656 <p> |
657 <p> |
657 Public method to handle the end of a reformat. |
658 Public method to handle the end of a reformat. |
658 </p> |
659 </p> |
|
660 |
659 <dl> |
661 <dl> |
660 |
662 |
661 <dt><i>src</i> (pathlib.Path)</dt> |
663 <dt><i>src</i> (pathlib.Path)</dt> |
662 <dd> |
664 <dd> |
663 name of the processed file |
665 name of the processed file |
710 <div align="right"><a href="#top">Up</a></div> |
712 <div align="right"><a href="#top">Up</a></div> |
711 <hr /> |
713 <hr /> |
712 <hr /> |
714 <hr /> |
713 <a NAME="BlackStatistics" ID="BlackStatistics"></a> |
715 <a NAME="BlackStatistics" ID="BlackStatistics"></a> |
714 <h2>BlackStatistics</h2> |
716 <h2>BlackStatistics</h2> |
715 |
|
716 <p> |
717 <p> |
717 Class containing the reformatting statistic data. |
718 Class containing the reformatting statistic data. |
718 </p> |
719 </p> |
|
720 |
719 <h3>Derived from</h3> |
721 <h3>Derived from</h3> |
720 None |
722 None |
721 <h3>Class Attributes</h3> |
723 <h3>Class Attributes</h3> |
722 |
724 <table> |
723 <table> |
725 <tr><td>changeCount</td></tr> |
724 <tr><td>changeCount</td></tr><tr><td>failureCount</td></tr><tr><td>ignoreCount</td></tr><tr><td>processedCount</td></tr><tr><td>sameCount</td></tr> |
726 <tr><td>failureCount</td></tr> |
725 </table> |
727 <tr><td>ignoreCount</td></tr> |
|
728 <tr><td>processedCount</td></tr> |
|
729 <tr><td>sameCount</td></tr> |
|
730 </table> |
|
731 |
726 <h3>Class Methods</h3> |
732 <h3>Class Methods</h3> |
727 |
733 <table> |
728 <table> |
734 <tr><td>None</td></tr> |
729 <tr><td>None</td></tr> |
735 </table> |
730 </table> |
736 |
731 <h3>Methods</h3> |
737 <h3>Methods</h3> |
732 |
738 <table> |
733 <table> |
739 <tr><td>None</td></tr> |
734 <tr><td>None</td></tr> |
740 </table> |
735 </table> |
741 |
736 <h3>Static Methods</h3> |
742 <h3>Static Methods</h3> |
737 |
743 <table> |
738 <table> |
744 <tr><td>None</td></tr> |
739 <tr><td>None</td></tr> |
745 </table> |
740 </table> |
746 |
741 |
747 |
742 <div align="right"><a href="#top">Up</a></div> |
748 <div align="right"><a href="#top">Up</a></div> |
743 <hr /> |
749 <hr /> |
744 </body></html> |
750 </body></html> |