src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Imports.ImportsChecker.html

branch
eric7
changeset 9458
3b41bb7d1623
parent 9295
d14096c04126
child 9503
ae9232bf4854
equal deleted inserted replaced
9457:1e0a9199479e 9458:3b41bb7d1623
57 <tr> 57 <tr>
58 <td><a href="#ImportsChecker.__init__">ImportsChecker</a></td> 58 <td><a href="#ImportsChecker.__init__">ImportsChecker</a></td>
59 <td>Constructor</td> 59 <td>Constructor</td>
60 </tr> 60 </tr>
61 <tr> 61 <tr>
62 <td><a href="#ImportsChecker.__atoi">__atoi</a></td>
63 <td>Private method to convert the given text to an integer number.</td>
64 </tr>
65 <tr>
62 <td><a href="#ImportsChecker.__checkBannedImport">__checkBannedImport</a></td> 66 <td><a href="#ImportsChecker.__checkBannedImport">__checkBannedImport</a></td>
63 <td>Private method to check import of banned modules.</td> 67 <td>Private method to check import of banned modules.</td>
64 </tr> 68 </tr>
65 <tr> 69 <tr>
66 <td><a href="#ImportsChecker.__checkBannedRelativeImports">__checkBannedRelativeImports</a></td> 70 <td><a href="#ImportsChecker.__checkBannedRelativeImports">__checkBannedRelativeImports</a></td>
101 <tr> 105 <tr>
102 <td><a href="#ImportsChecker.__isModuleBanned">__isModuleBanned</a></td> 106 <td><a href="#ImportsChecker.__isModuleBanned">__isModuleBanned</a></td>
103 <td>Private method to check, if the given module name banned.</td> 107 <td>Private method to check, if the given module name banned.</td>
104 </tr> 108 </tr>
105 <tr> 109 <tr>
110 <td><a href="#ImportsChecker.__naturalKeys">__naturalKeys</a></td>
111 <td>Private method to generate keys for natural sorting.</td>
112 </tr>
113 <tr>
114 <td><a href="#ImportsChecker.__naturally">__naturally</a></td>
115 <td>Private method to sort the given list of names naturally.</td>
116 </tr>
117 <tr>
106 <td><a href="#ImportsChecker.__tidyImports">__tidyImports</a></td> 118 <td><a href="#ImportsChecker.__tidyImports">__tidyImports</a></td>
107 <td>Private method to check various other import related topics.</td> 119 <td>Private method to check various other import related topics.</td>
108 </tr> 120 </tr>
109 <tr> 121 <tr>
110 <td><a href="#ImportsChecker.getStandardModules">getStandardModules</a></td> 122 <td><a href="#ImportsChecker.getStandardModules">getStandardModules</a></td>
111 <td>Public method to get a list of modules of the standard library.</td> 123 <td>Public method to get a list of modules of the standard library.</td>
112 </tr> 124 </tr>
113 <tr> 125 <tr>
126 <td><a href="#ImportsChecker.keyCallback">keyCallback</a></td>
127 <td></td>
128 </tr>
129 <tr>
130 <td><a href="#ImportsChecker.moduleKey">moduleKey</a></td>
131 <td>Public method to generate a key for the given module name.</td>
132 </tr>
133 <tr>
114 <td><a href="#ImportsChecker.run">run</a></td> 134 <td><a href="#ImportsChecker.run">run</a></td>
115 <td>Public method to check the given source against miscellaneous conditions.</td> 135 <td>Public method to check the given source against miscellaneous conditions.</td>
136 </tr>
137 <tr>
138 <td><a href="#ImportsChecker.sorted">sorted</a></td>
139 <td>Public method to sort the given list of names.</td>
116 </tr> 140 </tr>
117 </table> 141 </table>
118 <h3>Static Methods</h3> 142 <h3>Static Methods</h3>
119 143
120 <table> 144 <table>
161 <dt><i>args</i> (dict)</dt> 185 <dt><i>args</i> (dict)</dt>
162 <dd> 186 <dd>
163 dictionary of arguments for the various checks 187 dictionary of arguments for the various checks
164 </dd> 188 </dd>
165 </dl> 189 </dl>
190 <a NAME="ImportsChecker.__atoi" ID="ImportsChecker.__atoi"></a>
191 <h4>ImportsChecker.__atoi</h4>
192 <b>__atoi</b>(<i>text</i>)
193
194 <p>
195 Private method to convert the given text to an integer number.
196 </p>
197 <dl>
198
199 <dt><i>text</i> (str)</dt>
200 <dd>
201 text to be converted
202 </dd>
203 </dl>
204 <dl>
205 <dt>Return:</dt>
206 <dd>
207 integer number
208 </dd>
209 </dl>
210 <dl>
211 <dt>Return Type:</dt>
212 <dd>
213 int
214 </dd>
215 </dl>
166 <a NAME="ImportsChecker.__checkBannedImport" ID="ImportsChecker.__checkBannedImport"></a> 216 <a NAME="ImportsChecker.__checkBannedImport" ID="ImportsChecker.__checkBannedImport"></a>
167 <h4>ImportsChecker.__checkBannedImport</h4> 217 <h4>ImportsChecker.__checkBannedImport</h4>
168 <b>__checkBannedImport</b>(<i>node</i>) 218 <b>__checkBannedImport</b>(<i>node</i>)
169 219
170 <p> 220 <p>
375 <dt>Return Type:</dt> 425 <dt>Return Type:</dt>
376 <dd> 426 <dd>
377 bool 427 bool
378 </dd> 428 </dd>
379 </dl> 429 </dl>
430 <a NAME="ImportsChecker.__naturalKeys" ID="ImportsChecker.__naturalKeys"></a>
431 <h4>ImportsChecker.__naturalKeys</h4>
432 <b>__naturalKeys</b>(<i>text</i>)
433
434 <p>
435 Private method to generate keys for natural sorting.
436 </p>
437 <dl>
438
439 <dt><i>text</i> (str)</dt>
440 <dd>
441 text to generate a key for
442 </dd>
443 </dl>
444 <dl>
445 <dt>Return:</dt>
446 <dd>
447 key for natural sorting
448 </dd>
449 </dl>
450 <dl>
451 <dt>Return Type:</dt>
452 <dd>
453 list of str or int
454 </dd>
455 </dl>
456 <a NAME="ImportsChecker.__naturally" ID="ImportsChecker.__naturally"></a>
457 <h4>ImportsChecker.__naturally</h4>
458 <b>__naturally</b>(<i>toSort, key=None, reverse=False</i>)
459
460 <p>
461 Private method to sort the given list of names naturally.
462 </p>
463 <p>
464 Note: Natural sorting maintains the sort order of numbers (i.e.
465 [Q1, Q10, Q2] is sorted as [Q1, Q2, Q10] while the Python
466 standard sort would yield [Q1, Q10, Q2].
467 </p>
468 <dl>
469
470 <dt><i>toSort</i> (list of str)</dt>
471 <dd>
472 list of names to be sorted
473 </dd>
474 <dt><i>key</i> (function (optional))</dt>
475 <dd>
476 function to generate keys (defaults to None)
477 </dd>
478 <dt><i>reverse</i> (bool (optional))</dt>
479 <dd>
480 flag indicating a reverse sort (defaults to False)
481 </dd>
482 </dl>
483 <dl>
484 <dt>Return:</dt>
485 <dd>
486 sorted list of names
487 </dd>
488 </dl>
489 <dl>
490 <dt>Return Type:</dt>
491 <dd>
492 list of str
493 </dd>
494 </dl>
380 <a NAME="ImportsChecker.__tidyImports" ID="ImportsChecker.__tidyImports"></a> 495 <a NAME="ImportsChecker.__tidyImports" ID="ImportsChecker.__tidyImports"></a>
381 <h4>ImportsChecker.__tidyImports</h4> 496 <h4>ImportsChecker.__tidyImports</h4>
382 <b>__tidyImports</b>(<i></i>) 497 <b>__tidyImports</b>(<i></i>)
383 498
384 <p> 499 <p>
401 <dt>Return Type:</dt> 516 <dt>Return Type:</dt>
402 <dd> 517 <dd>
403 set of str 518 set of str
404 </dd> 519 </dd>
405 </dl> 520 </dl>
521 <a NAME="ImportsChecker.keyCallback" ID="ImportsChecker.keyCallback"></a>
522 <h4>ImportsChecker.keyCallback</h4>
523 <b>keyCallback</b>(<i></i>)
524
525 <a NAME="ImportsChecker.moduleKey" ID="ImportsChecker.moduleKey"></a>
526 <h4>ImportsChecker.moduleKey</h4>
527 <b>moduleKey</b>(<i>moduleName</i>)
528
529 <p>
530 Public method to generate a key for the given module name.
531 </p>
532 <dl>
533
534 <dt><i>moduleName</i> (str)</dt>
535 <dd>
536 module name
537 </dd>
538 </dl>
539 <dl>
540 <dt>Return:</dt>
541 <dd>
542 generated key
543 </dd>
544 </dl>
545 <dl>
546 <dt>Return Type:</dt>
547 <dd>
548 str
549 </dd>
550 </dl>
406 <a NAME="ImportsChecker.run" ID="ImportsChecker.run"></a> 551 <a NAME="ImportsChecker.run" ID="ImportsChecker.run"></a>
407 <h4>ImportsChecker.run</h4> 552 <h4>ImportsChecker.run</h4>
408 <b>run</b>(<i></i>) 553 <b>run</b>(<i></i>)
409 554
410 <p> 555 <p>
411 Public method to check the given source against miscellaneous 556 Public method to check the given source against miscellaneous
412 conditions. 557 conditions.
413 </p> 558 </p>
559 <a NAME="ImportsChecker.sorted" ID="ImportsChecker.sorted"></a>
560 <h4>ImportsChecker.sorted</h4>
561 <b>sorted</b>(<i>toSort, key=None, reverse=False</i>)
562
563 <p>
564 Public method to sort the given list of names.
565 </p>
566 <dl>
567
568 <dt><i>toSort</i> (list of str)</dt>
569 <dd>
570 list of names to be sorted
571 </dd>
572 <dt><i>key</i> (function (optional))</dt>
573 <dd>
574 function to generate keys (defaults to None)
575 </dd>
576 <dt><i>reverse</i> (bool (optional))</dt>
577 <dd>
578 flag indicating a reverse sort (defaults to False)
579 </dd>
580 </dl>
581 <dl>
582 <dt>Return:</dt>
583 <dd>
584 sorted list of names
585 </dd>
586 </dl>
587 <dl>
588 <dt>Return Type:</dt>
589 <dd>
590 list of str
591 </dd>
592 </dl>
414 <div align="right"><a href="#top">Up</a></div> 593 <div align="right"><a href="#top">Up</a></div>
415 <hr /> 594 <hr />
416 </body></html> 595 </body></html>

eric ide

mercurial