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.Plugins.CheckerPlugins.CodeStyleChecker.DocStyle.DocStyleChecker</h1> |
9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.DocStyle.DocStyleChecker</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing a checker for documentation string conventions. |
11 Module implementing a checker for documentation string conventions. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
|
16 <table> |
15 <table> |
17 <tr><td>None</td></tr> |
16 <tr><td>None</td></tr> |
18 </table> |
17 </table> |
|
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
|
21 <table> |
20 <table> |
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#DocStyleChecker">DocStyleChecker</a></td> |
22 <td><a href="#DocStyleChecker">DocStyleChecker</a></td> |
25 <td>Class implementing a checker for documentation string conventions.</td> |
23 <td>Class implementing a checker for documentation string conventions.</td> |
26 </tr> |
24 </tr> |
27 <tr> |
25 <tr> |
28 <td><a href="#DocStyleContext">DocStyleContext</a></td> |
26 <td><a href="#DocStyleContext">DocStyleContext</a></td> |
29 <td>Class implementing the source context.</td> |
27 <td>Class implementing the source context.</td> |
30 </tr> |
28 </tr> |
31 </table> |
29 </table> |
|
30 |
32 <h3>Functions</h3> |
31 <h3>Functions</h3> |
33 |
|
34 <table> |
32 <table> |
35 <tr><td>None</td></tr> |
33 <tr><td>None</td></tr> |
36 </table> |
34 </table> |
|
35 |
37 <hr /> |
36 <hr /> |
38 <hr /> |
37 <hr /> |
39 <a NAME="DocStyleChecker" ID="DocStyleChecker"></a> |
38 <a NAME="DocStyleChecker" ID="DocStyleChecker"></a> |
40 <h2>DocStyleChecker</h2> |
39 <h2>DocStyleChecker</h2> |
41 |
|
42 <p> |
40 <p> |
43 Class implementing a checker for documentation string conventions. |
41 Class implementing a checker for documentation string conventions. |
44 </p> |
42 </p> |
|
43 |
45 <h3>Derived from</h3> |
44 <h3>Derived from</h3> |
46 None |
45 None |
47 <h3>Class Attributes</h3> |
46 <h3>Class Attributes</h3> |
48 |
|
49 <table> |
47 <table> |
50 <tr><td>Codes</td></tr> |
48 <tr><td>Codes</td></tr> |
51 </table> |
49 </table> |
|
50 |
52 <h3>Class Methods</h3> |
51 <h3>Class Methods</h3> |
53 |
|
54 <table> |
52 <table> |
55 <tr><td>None</td></tr> |
53 <tr><td>None</td></tr> |
56 </table> |
54 </table> |
|
55 |
57 <h3>Methods</h3> |
56 <h3>Methods</h3> |
58 |
|
59 <table> |
57 <table> |
60 |
|
61 <tr> |
58 <tr> |
62 <td><a href="#DocStyleChecker.__init__">DocStyleChecker</a></td> |
59 <td><a href="#DocStyleChecker.__init__">DocStyleChecker</a></td> |
63 <td>Constructor</td> |
60 <td>Constructor</td> |
64 </tr> |
61 </tr> |
65 <tr> |
62 <tr> |
245 <tr> |
242 <tr> |
246 <td><a href="#DocStyleChecker.run">run</a></td> |
243 <td><a href="#DocStyleChecker.run">run</a></td> |
247 <td>Public method to check the given source for violations of doc string conventions.</td> |
244 <td>Public method to check the given source for violations of doc string conventions.</td> |
248 </tr> |
245 </tr> |
249 </table> |
246 </table> |
|
247 |
250 <h3>Static Methods</h3> |
248 <h3>Static Methods</h3> |
251 |
|
252 <table> |
249 <table> |
253 <tr><td>None</td></tr> |
250 <tr><td>None</td></tr> |
254 </table> |
251 </table> |
255 |
252 |
|
253 |
256 <a NAME="DocStyleChecker.__init__" ID="DocStyleChecker.__init__"></a> |
254 <a NAME="DocStyleChecker.__init__" ID="DocStyleChecker.__init__"></a> |
257 <h4>DocStyleChecker (Constructor)</h4> |
255 <h4>DocStyleChecker (Constructor)</h4> |
258 <b>DocStyleChecker</b>(<i>source, filename, select, ignore, expected, repeat, maxLineLength=88, docType="pep257", </i>) |
256 <b>DocStyleChecker</b>(<i>source, filename, select, ignore, expected, repeat, maxLineLength=88, docType="pep257", </i>) |
259 |
|
260 <p> |
257 <p> |
261 Constructor |
258 Constructor |
262 </p> |
259 </p> |
|
260 |
263 <dl> |
261 <dl> |
264 |
262 |
265 <dt><i>source</i> (list of str)</dt> |
263 <dt><i>source</i> (list of str)</dt> |
266 <dd> |
264 <dd> |
267 source code to be checked |
265 source code to be checked |
296 </dd> |
294 </dd> |
297 </dl> |
295 </dl> |
298 <a NAME="DocStyleChecker.__checkBackslashes" ID="DocStyleChecker.__checkBackslashes"></a> |
296 <a NAME="DocStyleChecker.__checkBackslashes" ID="DocStyleChecker.__checkBackslashes"></a> |
299 <h4>DocStyleChecker.__checkBackslashes</h4> |
297 <h4>DocStyleChecker.__checkBackslashes</h4> |
300 <b>__checkBackslashes</b>(<i>docstringContext, context</i>) |
298 <b>__checkBackslashes</b>(<i>docstringContext, context</i>) |
301 |
|
302 <p> |
299 <p> |
303 Private method to check, that all docstrings containing |
300 Private method to check, that all docstrings containing |
304 backslashes are surrounded by raw triple double quotes. |
301 backslashes are surrounded by raw triple double quotes. |
305 </p> |
302 </p> |
|
303 |
306 <dl> |
304 <dl> |
307 |
305 |
308 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
306 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
309 <dd> |
307 <dd> |
310 docstring context |
308 docstring context |
315 </dd> |
313 </dd> |
316 </dl> |
314 </dl> |
317 <a NAME="DocStyleChecker.__checkBlankAfterLastParagraph" ID="DocStyleChecker.__checkBlankAfterLastParagraph"></a> |
315 <a NAME="DocStyleChecker.__checkBlankAfterLastParagraph" ID="DocStyleChecker.__checkBlankAfterLastParagraph"></a> |
318 <h4>DocStyleChecker.__checkBlankAfterLastParagraph</h4> |
316 <h4>DocStyleChecker.__checkBlankAfterLastParagraph</h4> |
319 <b>__checkBlankAfterLastParagraph</b>(<i>docstringContext, context</i>) |
317 <b>__checkBlankAfterLastParagraph</b>(<i>docstringContext, context</i>) |
320 |
|
321 <p> |
318 <p> |
322 Private method to check, that the last paragraph of docstrings is |
319 Private method to check, that the last paragraph of docstrings is |
323 followed by a blank line. |
320 followed by a blank line. |
324 </p> |
321 </p> |
|
322 |
325 <dl> |
323 <dl> |
326 |
324 |
327 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
325 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
328 <dd> |
326 <dd> |
329 docstring context |
327 docstring context |
334 </dd> |
332 </dd> |
335 </dl> |
333 </dl> |
336 <a NAME="DocStyleChecker.__checkBlankAfterSummary" ID="DocStyleChecker.__checkBlankAfterSummary"></a> |
334 <a NAME="DocStyleChecker.__checkBlankAfterSummary" ID="DocStyleChecker.__checkBlankAfterSummary"></a> |
337 <h4>DocStyleChecker.__checkBlankAfterSummary</h4> |
335 <h4>DocStyleChecker.__checkBlankAfterSummary</h4> |
338 <b>__checkBlankAfterSummary</b>(<i>docstringContext, context</i>) |
336 <b>__checkBlankAfterSummary</b>(<i>docstringContext, context</i>) |
339 |
|
340 <p> |
337 <p> |
341 Private method to check, that docstring summaries are followed |
338 Private method to check, that docstring summaries are followed |
342 by a blank line. |
339 by a blank line. |
343 </p> |
340 </p> |
|
341 |
344 <dl> |
342 <dl> |
345 |
343 |
346 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
344 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
347 <dd> |
345 <dd> |
348 docstring context |
346 docstring context |
353 </dd> |
351 </dd> |
354 </dl> |
352 </dl> |
355 <a NAME="DocStyleChecker.__checkBlankBeforeAndAfterClass" ID="DocStyleChecker.__checkBlankBeforeAndAfterClass"></a> |
353 <a NAME="DocStyleChecker.__checkBlankBeforeAndAfterClass" ID="DocStyleChecker.__checkBlankBeforeAndAfterClass"></a> |
356 <h4>DocStyleChecker.__checkBlankBeforeAndAfterClass</h4> |
354 <h4>DocStyleChecker.__checkBlankBeforeAndAfterClass</h4> |
357 <b>__checkBlankBeforeAndAfterClass</b>(<i>docstringContext, context</i>) |
355 <b>__checkBlankBeforeAndAfterClass</b>(<i>docstringContext, context</i>) |
358 |
|
359 <p> |
356 <p> |
360 Private method to check, that class docstrings have one |
357 Private method to check, that class docstrings have one |
361 blank line around them. |
358 blank line around them. |
362 </p> |
359 </p> |
|
360 |
363 <dl> |
361 <dl> |
364 |
362 |
365 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
363 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
366 <dd> |
364 <dd> |
367 docstring context |
365 docstring context |
372 </dd> |
370 </dd> |
373 </dl> |
371 </dl> |
374 <a NAME="DocStyleChecker.__checkClassDocstring" ID="DocStyleChecker.__checkClassDocstring"></a> |
372 <a NAME="DocStyleChecker.__checkClassDocstring" ID="DocStyleChecker.__checkClassDocstring"></a> |
375 <h4>DocStyleChecker.__checkClassDocstring</h4> |
373 <h4>DocStyleChecker.__checkClassDocstring</h4> |
376 <b>__checkClassDocstring</b>(<i>docstringContext, context</i>) |
374 <b>__checkClassDocstring</b>(<i>docstringContext, context</i>) |
377 |
|
378 <p> |
375 <p> |
379 Private method to check, that all public functions and methods |
376 Private method to check, that all public functions and methods |
380 have a docstring. |
377 have a docstring. |
381 </p> |
378 </p> |
|
379 |
382 <dl> |
380 <dl> |
383 |
381 |
384 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
382 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
385 <dd> |
383 <dd> |
386 docstring context |
384 docstring context |
391 </dd> |
389 </dd> |
392 </dl> |
390 </dl> |
393 <a NAME="DocStyleChecker.__checkEndsWithPeriod" ID="DocStyleChecker.__checkEndsWithPeriod"></a> |
391 <a NAME="DocStyleChecker.__checkEndsWithPeriod" ID="DocStyleChecker.__checkEndsWithPeriod"></a> |
394 <h4>DocStyleChecker.__checkEndsWithPeriod</h4> |
392 <h4>DocStyleChecker.__checkEndsWithPeriod</h4> |
395 <b>__checkEndsWithPeriod</b>(<i>docstringContext, context</i>) |
393 <b>__checkEndsWithPeriod</b>(<i>docstringContext, context</i>) |
396 |
|
397 <p> |
394 <p> |
398 Private method to check, that docstring summaries end with a period. |
395 Private method to check, that docstring summaries end with a period. |
399 </p> |
396 </p> |
|
397 |
400 <dl> |
398 <dl> |
401 |
399 |
402 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
400 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
403 <dd> |
401 <dd> |
404 docstring context |
402 docstring context |
409 </dd> |
407 </dd> |
410 </dl> |
408 </dl> |
411 <a NAME="DocStyleChecker.__checkEricBlankAfterSummary" ID="DocStyleChecker.__checkEricBlankAfterSummary"></a> |
409 <a NAME="DocStyleChecker.__checkEricBlankAfterSummary" ID="DocStyleChecker.__checkEricBlankAfterSummary"></a> |
412 <h4>DocStyleChecker.__checkEricBlankAfterSummary</h4> |
410 <h4>DocStyleChecker.__checkEricBlankAfterSummary</h4> |
413 <b>__checkEricBlankAfterSummary</b>(<i>docstringContext, context</i>) |
411 <b>__checkEricBlankAfterSummary</b>(<i>docstringContext, context</i>) |
414 |
|
415 <p> |
412 <p> |
416 Private method to check, that docstring summaries are followed |
413 Private method to check, that docstring summaries are followed |
417 by a blank line. |
414 by a blank line. |
418 </p> |
415 </p> |
|
416 |
419 <dl> |
417 <dl> |
420 |
418 |
421 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
419 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
422 <dd> |
420 <dd> |
423 docstring context |
421 docstring context |
428 </dd> |
426 </dd> |
429 </dl> |
427 </dl> |
430 <a NAME="DocStyleChecker.__checkEricDocumentationDeprecatedTags" ID="DocStyleChecker.__checkEricDocumentationDeprecatedTags"></a> |
428 <a NAME="DocStyleChecker.__checkEricDocumentationDeprecatedTags" ID="DocStyleChecker.__checkEricDocumentationDeprecatedTags"></a> |
431 <h4>DocStyleChecker.__checkEricDocumentationDeprecatedTags</h4> |
429 <h4>DocStyleChecker.__checkEricDocumentationDeprecatedTags</h4> |
432 <b>__checkEricDocumentationDeprecatedTags</b>(<i>docstringContext, context, </i>) |
430 <b>__checkEricDocumentationDeprecatedTags</b>(<i>docstringContext, context, </i>) |
433 |
|
434 <p> |
431 <p> |
435 Private method to check the use of deprecated documentation tags. |
432 Private method to check the use of deprecated documentation tags. |
436 </p> |
433 </p> |
|
434 |
437 <dl> |
435 <dl> |
438 |
436 |
439 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
437 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
440 <dd> |
438 <dd> |
441 docstring context |
439 docstring context |
446 </dd> |
444 </dd> |
447 </dl> |
445 </dl> |
448 <a NAME="DocStyleChecker.__checkEricDocumentationIndent" ID="DocStyleChecker.__checkEricDocumentationIndent"></a> |
446 <a NAME="DocStyleChecker.__checkEricDocumentationIndent" ID="DocStyleChecker.__checkEricDocumentationIndent"></a> |
449 <h4>DocStyleChecker.__checkEricDocumentationIndent</h4> |
447 <h4>DocStyleChecker.__checkEricDocumentationIndent</h4> |
450 <b>__checkEricDocumentationIndent</b>(<i>docstringContext, context, </i>) |
448 <b>__checkEricDocumentationIndent</b>(<i>docstringContext, context, </i>) |
451 |
|
452 <p> |
449 <p> |
453 Private method to check the the correct indentation of the tag lines. |
450 Private method to check the the correct indentation of the tag lines. |
454 </p> |
451 </p> |
|
452 |
455 <dl> |
453 <dl> |
456 |
454 |
457 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
455 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
458 <dd> |
456 <dd> |
459 docstring context |
457 docstring context |
464 </dd> |
462 </dd> |
465 </dl> |
463 </dl> |
466 <a NAME="DocStyleChecker.__checkEricDocumentationSequence" ID="DocStyleChecker.__checkEricDocumentationSequence"></a> |
464 <a NAME="DocStyleChecker.__checkEricDocumentationSequence" ID="DocStyleChecker.__checkEricDocumentationSequence"></a> |
467 <h4>DocStyleChecker.__checkEricDocumentationSequence</h4> |
465 <h4>DocStyleChecker.__checkEricDocumentationSequence</h4> |
468 <b>__checkEricDocumentationSequence</b>(<i>docstringContext, context, </i>) |
466 <b>__checkEricDocumentationSequence</b>(<i>docstringContext, context, </i>) |
469 |
|
470 <p> |
467 <p> |
471 Private method to check, that method docstring follows the correct sequence |
468 Private method to check, that method docstring follows the correct sequence |
472 of entries (e.g. @param is followed by @type). |
469 of entries (e.g. @param is followed by @type). |
473 </p> |
470 </p> |
|
471 |
474 <dl> |
472 <dl> |
475 |
473 |
476 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
474 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
477 <dd> |
475 <dd> |
478 docstring context |
476 docstring context |
483 </dd> |
481 </dd> |
484 </dl> |
482 </dl> |
485 <a NAME="DocStyleChecker.__checkEricEndsWithPeriod" ID="DocStyleChecker.__checkEricEndsWithPeriod"></a> |
483 <a NAME="DocStyleChecker.__checkEricEndsWithPeriod" ID="DocStyleChecker.__checkEricEndsWithPeriod"></a> |
486 <h4>DocStyleChecker.__checkEricEndsWithPeriod</h4> |
484 <h4>DocStyleChecker.__checkEricEndsWithPeriod</h4> |
487 <b>__checkEricEndsWithPeriod</b>(<i>docstringContext, context</i>) |
485 <b>__checkEricEndsWithPeriod</b>(<i>docstringContext, context</i>) |
488 |
|
489 <p> |
486 <p> |
490 Private method to check, that docstring summaries end with a period. |
487 Private method to check, that docstring summaries end with a period. |
491 </p> |
488 </p> |
|
489 |
492 <dl> |
490 <dl> |
493 |
491 |
494 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
492 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
495 <dd> |
493 <dd> |
496 docstring context |
494 docstring context |
501 </dd> |
499 </dd> |
502 </dl> |
500 </dl> |
503 <a NAME="DocStyleChecker.__checkEricException" ID="DocStyleChecker.__checkEricException"></a> |
501 <a NAME="DocStyleChecker.__checkEricException" ID="DocStyleChecker.__checkEricException"></a> |
504 <h4>DocStyleChecker.__checkEricException</h4> |
502 <h4>DocStyleChecker.__checkEricException</h4> |
505 <b>__checkEricException</b>(<i>docstringContext, context</i>) |
503 <b>__checkEricException</b>(<i>docstringContext, context</i>) |
506 |
|
507 <p> |
504 <p> |
508 Private method to check, that docstrings contain an @exception line |
505 Private method to check, that docstrings contain an @exception line |
509 if they raise an exception and don't otherwise. |
506 if they raise an exception and don't otherwise. |
510 </p> |
507 </p> |
511 <p> |
508 <p> |
512 Note: This method also checks the raised and documented exceptions for |
509 Note: This method also checks the raised and documented exceptions for |
513 completeness (i.e. raised exceptions that are not documented or |
510 completeness (i.e. raised exceptions that are not documented or |
514 documented exceptions that are not raised) |
511 documented exceptions that are not raised) |
515 </p> |
512 </p> |
|
513 |
516 <dl> |
514 <dl> |
517 |
515 |
518 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
516 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
519 <dd> |
517 <dd> |
520 docstring context |
518 docstring context |
525 </dd> |
523 </dd> |
526 </dl> |
524 </dl> |
527 <a NAME="DocStyleChecker.__checkEricFunctionArguments" ID="DocStyleChecker.__checkEricFunctionArguments"></a> |
525 <a NAME="DocStyleChecker.__checkEricFunctionArguments" ID="DocStyleChecker.__checkEricFunctionArguments"></a> |
528 <h4>DocStyleChecker.__checkEricFunctionArguments</h4> |
526 <h4>DocStyleChecker.__checkEricFunctionArguments</h4> |
529 <b>__checkEricFunctionArguments</b>(<i>docstringContext, context</i>) |
527 <b>__checkEricFunctionArguments</b>(<i>docstringContext, context</i>) |
530 |
|
531 <p> |
528 <p> |
532 Private method to check, that docstrings contain an @param and/or |
529 Private method to check, that docstrings contain an @param and/or |
533 @keyparam line for each argument. |
530 @keyparam line for each argument. |
534 </p> |
531 </p> |
|
532 |
535 <dl> |
533 <dl> |
536 |
534 |
537 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
535 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
538 <dd> |
536 <dd> |
539 docstring context |
537 docstring context |
544 </dd> |
542 </dd> |
545 </dl> |
543 </dl> |
546 <a NAME="DocStyleChecker.__checkEricNBlankAfterLastParagraph" ID="DocStyleChecker.__checkEricNBlankAfterLastParagraph"></a> |
544 <a NAME="DocStyleChecker.__checkEricNBlankAfterLastParagraph" ID="DocStyleChecker.__checkEricNBlankAfterLastParagraph"></a> |
547 <h4>DocStyleChecker.__checkEricNBlankAfterLastParagraph</h4> |
545 <h4>DocStyleChecker.__checkEricNBlankAfterLastParagraph</h4> |
548 <b>__checkEricNBlankAfterLastParagraph</b>(<i>docstringContext, context</i>) |
546 <b>__checkEricNBlankAfterLastParagraph</b>(<i>docstringContext, context</i>) |
549 |
|
550 <p> |
547 <p> |
551 Private method to check, that the last paragraph of docstrings is |
548 Private method to check, that the last paragraph of docstrings is |
552 not followed by a blank line. |
549 not followed by a blank line. |
553 </p> |
550 </p> |
|
551 |
554 <dl> |
552 <dl> |
555 |
553 |
556 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
554 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
557 <dd> |
555 <dd> |
558 docstring context |
556 docstring context |
563 </dd> |
561 </dd> |
564 </dl> |
562 </dl> |
565 <a NAME="DocStyleChecker.__checkEricNoBlankBeforeAndAfterClassOrFunction" ID="DocStyleChecker.__checkEricNoBlankBeforeAndAfterClassOrFunction"></a> |
563 <a NAME="DocStyleChecker.__checkEricNoBlankBeforeAndAfterClassOrFunction" ID="DocStyleChecker.__checkEricNoBlankBeforeAndAfterClassOrFunction"></a> |
566 <h4>DocStyleChecker.__checkEricNoBlankBeforeAndAfterClassOrFunction</h4> |
564 <h4>DocStyleChecker.__checkEricNoBlankBeforeAndAfterClassOrFunction</h4> |
567 <b>__checkEricNoBlankBeforeAndAfterClassOrFunction</b>(<i>docstringContext, context</i>) |
565 <b>__checkEricNoBlankBeforeAndAfterClassOrFunction</b>(<i>docstringContext, context</i>) |
568 |
|
569 <p> |
566 <p> |
570 Private method to check, that class and function/method docstrings |
567 Private method to check, that class and function/method docstrings |
571 have no blank line around them. |
568 have no blank line around them. |
572 </p> |
569 </p> |
|
570 |
573 <dl> |
571 <dl> |
574 |
572 |
575 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
573 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
576 <dd> |
574 <dd> |
577 docstring context |
575 docstring context |
582 </dd> |
580 </dd> |
583 </dl> |
581 </dl> |
584 <a NAME="DocStyleChecker.__checkEricQuotesOnSeparateLines" ID="DocStyleChecker.__checkEricQuotesOnSeparateLines"></a> |
582 <a NAME="DocStyleChecker.__checkEricQuotesOnSeparateLines" ID="DocStyleChecker.__checkEricQuotesOnSeparateLines"></a> |
585 <h4>DocStyleChecker.__checkEricQuotesOnSeparateLines</h4> |
583 <h4>DocStyleChecker.__checkEricQuotesOnSeparateLines</h4> |
586 <b>__checkEricQuotesOnSeparateLines</b>(<i>docstringContext, context</i>) |
584 <b>__checkEricQuotesOnSeparateLines</b>(<i>docstringContext, context</i>) |
587 |
|
588 <p> |
585 <p> |
589 Private method to check, that leading and trailing quotes are on |
586 Private method to check, that leading and trailing quotes are on |
590 a line by themselves. |
587 a line by themselves. |
591 </p> |
588 </p> |
|
589 |
592 <dl> |
590 <dl> |
593 |
591 |
594 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
592 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
595 <dd> |
593 <dd> |
596 docstring context |
594 docstring context |
601 </dd> |
599 </dd> |
602 </dl> |
600 </dl> |
603 <a NAME="DocStyleChecker.__checkEricReturn" ID="DocStyleChecker.__checkEricReturn"></a> |
601 <a NAME="DocStyleChecker.__checkEricReturn" ID="DocStyleChecker.__checkEricReturn"></a> |
604 <h4>DocStyleChecker.__checkEricReturn</h4> |
602 <h4>DocStyleChecker.__checkEricReturn</h4> |
605 <b>__checkEricReturn</b>(<i>docstringContext, context</i>) |
603 <b>__checkEricReturn</b>(<i>docstringContext, context</i>) |
606 |
|
607 <p> |
604 <p> |
608 Private method to check, that docstrings contain an @return line |
605 Private method to check, that docstrings contain an @return line |
609 if they return anything and don't otherwise. |
606 if they return anything and don't otherwise. |
610 </p> |
607 </p> |
|
608 |
611 <dl> |
609 <dl> |
612 |
610 |
613 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
611 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
614 <dd> |
612 <dd> |
615 docstring context |
613 docstring context |
620 </dd> |
618 </dd> |
621 </dl> |
619 </dl> |
622 <a NAME="DocStyleChecker.__checkEricSignal" ID="DocStyleChecker.__checkEricSignal"></a> |
620 <a NAME="DocStyleChecker.__checkEricSignal" ID="DocStyleChecker.__checkEricSignal"></a> |
623 <h4>DocStyleChecker.__checkEricSignal</h4> |
621 <h4>DocStyleChecker.__checkEricSignal</h4> |
624 <b>__checkEricSignal</b>(<i>docstringContext, context</i>) |
622 <b>__checkEricSignal</b>(<i>docstringContext, context</i>) |
625 |
|
626 <p> |
623 <p> |
627 Private method to check, that docstrings contain an @signal line |
624 Private method to check, that docstrings contain an @signal line |
628 if they define signals and don't otherwise. |
625 if they define signals and don't otherwise. |
629 </p> |
626 </p> |
630 <p> |
627 <p> |
631 Note: This method also checks the defined and documented signals for |
628 Note: This method also checks the defined and documented signals for |
632 completeness (i.e. defined signals that are not documented or |
629 completeness (i.e. defined signals that are not documented or |
633 documented signals that are not defined) |
630 documented signals that are not defined) |
634 </p> |
631 </p> |
|
632 |
635 <dl> |
633 <dl> |
636 |
634 |
637 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
635 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
638 <dd> |
636 <dd> |
639 docstring context |
637 docstring context |
644 </dd> |
642 </dd> |
645 </dl> |
643 </dl> |
646 <a NAME="DocStyleChecker.__checkEricSummary" ID="DocStyleChecker.__checkEricSummary"></a> |
644 <a NAME="DocStyleChecker.__checkEricSummary" ID="DocStyleChecker.__checkEricSummary"></a> |
647 <h4>DocStyleChecker.__checkEricSummary</h4> |
645 <h4>DocStyleChecker.__checkEricSummary</h4> |
648 <b>__checkEricSummary</b>(<i>docstringContext, context</i>) |
646 <b>__checkEricSummary</b>(<i>docstringContext, context</i>) |
649 |
|
650 <p> |
647 <p> |
651 Private method to check, that method docstring summaries start with |
648 Private method to check, that method docstring summaries start with |
652 specific words. |
649 specific words. |
653 </p> |
650 </p> |
|
651 |
654 <dl> |
652 <dl> |
655 |
653 |
656 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
654 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
657 <dd> |
655 <dd> |
658 docstring context |
656 docstring context |
663 </dd> |
661 </dd> |
664 </dl> |
662 </dl> |
665 <a NAME="DocStyleChecker.__checkEricYield" ID="DocStyleChecker.__checkEricYield"></a> |
663 <a NAME="DocStyleChecker.__checkEricYield" ID="DocStyleChecker.__checkEricYield"></a> |
666 <h4>DocStyleChecker.__checkEricYield</h4> |
664 <h4>DocStyleChecker.__checkEricYield</h4> |
667 <b>__checkEricYield</b>(<i>docstringContext, context</i>) |
665 <b>__checkEricYield</b>(<i>docstringContext, context</i>) |
668 |
|
669 <p> |
666 <p> |
670 Private method to check, that docstrings contain an @yield line |
667 Private method to check, that docstrings contain an @yield line |
671 if they return anything and don't otherwise. |
668 if they return anything and don't otherwise. |
672 </p> |
669 </p> |
|
670 |
673 <dl> |
671 <dl> |
674 |
672 |
675 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
673 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
676 <dd> |
674 <dd> |
677 docstring context |
675 docstring context |
682 </dd> |
680 </dd> |
683 </dl> |
681 </dl> |
684 <a NAME="DocStyleChecker.__checkFunctionDocstring" ID="DocStyleChecker.__checkFunctionDocstring"></a> |
682 <a NAME="DocStyleChecker.__checkFunctionDocstring" ID="DocStyleChecker.__checkFunctionDocstring"></a> |
685 <h4>DocStyleChecker.__checkFunctionDocstring</h4> |
683 <h4>DocStyleChecker.__checkFunctionDocstring</h4> |
686 <b>__checkFunctionDocstring</b>(<i>docstringContext, context</i>) |
684 <b>__checkFunctionDocstring</b>(<i>docstringContext, context</i>) |
687 |
|
688 <p> |
685 <p> |
689 Private method to check, that all public functions and methods |
686 Private method to check, that all public functions and methods |
690 have a docstring. |
687 have a docstring. |
691 </p> |
688 </p> |
|
689 |
692 <dl> |
690 <dl> |
693 |
691 |
694 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
692 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
695 <dd> |
693 <dd> |
696 docstring context |
694 docstring context |
701 </dd> |
699 </dd> |
702 </dl> |
700 </dl> |
703 <a NAME="DocStyleChecker.__checkImperativeMood" ID="DocStyleChecker.__checkImperativeMood"></a> |
701 <a NAME="DocStyleChecker.__checkImperativeMood" ID="DocStyleChecker.__checkImperativeMood"></a> |
704 <h4>DocStyleChecker.__checkImperativeMood</h4> |
702 <h4>DocStyleChecker.__checkImperativeMood</h4> |
705 <b>__checkImperativeMood</b>(<i>docstringContext, context</i>) |
703 <b>__checkImperativeMood</b>(<i>docstringContext, context</i>) |
706 |
|
707 <p> |
704 <p> |
708 Private method to check, that docstring summaries are in |
705 Private method to check, that docstring summaries are in |
709 imperative mood. |
706 imperative mood. |
710 </p> |
707 </p> |
|
708 |
711 <dl> |
709 <dl> |
712 |
710 |
713 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
711 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
714 <dd> |
712 <dd> |
715 docstring context |
713 docstring context |
720 </dd> |
718 </dd> |
721 </dl> |
719 </dl> |
722 <a NAME="DocStyleChecker.__checkIndent" ID="DocStyleChecker.__checkIndent"></a> |
720 <a NAME="DocStyleChecker.__checkIndent" ID="DocStyleChecker.__checkIndent"></a> |
723 <h4>DocStyleChecker.__checkIndent</h4> |
721 <h4>DocStyleChecker.__checkIndent</h4> |
724 <b>__checkIndent</b>(<i>docstringContext, context</i>) |
722 <b>__checkIndent</b>(<i>docstringContext, context</i>) |
725 |
|
726 <p> |
723 <p> |
727 Private method to check, that docstrings are properly indented. |
724 Private method to check, that docstrings are properly indented. |
728 </p> |
725 </p> |
|
726 |
729 <dl> |
727 <dl> |
730 |
728 |
731 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
729 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
732 <dd> |
730 <dd> |
733 docstring context |
731 docstring context |
738 </dd> |
736 </dd> |
739 </dl> |
737 </dl> |
740 <a NAME="DocStyleChecker.__checkModulesDocstrings" ID="DocStyleChecker.__checkModulesDocstrings"></a> |
738 <a NAME="DocStyleChecker.__checkModulesDocstrings" ID="DocStyleChecker.__checkModulesDocstrings"></a> |
741 <h4>DocStyleChecker.__checkModulesDocstrings</h4> |
739 <h4>DocStyleChecker.__checkModulesDocstrings</h4> |
742 <b>__checkModulesDocstrings</b>(<i>docstringContext, context</i>) |
740 <b>__checkModulesDocstrings</b>(<i>docstringContext, context</i>) |
743 |
|
744 <p> |
741 <p> |
745 Private method to check, if the module has a docstring. |
742 Private method to check, if the module has a docstring. |
746 </p> |
743 </p> |
|
744 |
747 <dl> |
745 <dl> |
748 |
746 |
749 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
747 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
750 <dd> |
748 <dd> |
751 docstring context |
749 docstring context |
756 </dd> |
754 </dd> |
757 </dl> |
755 </dl> |
758 <a NAME="DocStyleChecker.__checkNoBlankLineBefore" ID="DocStyleChecker.__checkNoBlankLineBefore"></a> |
756 <a NAME="DocStyleChecker.__checkNoBlankLineBefore" ID="DocStyleChecker.__checkNoBlankLineBefore"></a> |
759 <h4>DocStyleChecker.__checkNoBlankLineBefore</h4> |
757 <h4>DocStyleChecker.__checkNoBlankLineBefore</h4> |
760 <b>__checkNoBlankLineBefore</b>(<i>docstringContext, context</i>) |
758 <b>__checkNoBlankLineBefore</b>(<i>docstringContext, context</i>) |
761 |
|
762 <p> |
759 <p> |
763 Private method to check, that function/method docstrings are not |
760 Private method to check, that function/method docstrings are not |
764 preceded by a blank line. |
761 preceded by a blank line. |
765 </p> |
762 </p> |
|
763 |
766 <dl> |
764 <dl> |
767 |
765 |
768 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
766 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
769 <dd> |
767 <dd> |
770 docstring context |
768 docstring context |
775 </dd> |
773 </dd> |
776 </dl> |
774 </dl> |
777 <a NAME="DocStyleChecker.__checkNoSignature" ID="DocStyleChecker.__checkNoSignature"></a> |
775 <a NAME="DocStyleChecker.__checkNoSignature" ID="DocStyleChecker.__checkNoSignature"></a> |
778 <h4>DocStyleChecker.__checkNoSignature</h4> |
776 <h4>DocStyleChecker.__checkNoSignature</h4> |
779 <b>__checkNoSignature</b>(<i>docstringContext, context</i>) |
777 <b>__checkNoSignature</b>(<i>docstringContext, context</i>) |
780 |
|
781 <p> |
778 <p> |
782 Private method to check, that docstring summaries don't repeat |
779 Private method to check, that docstring summaries don't repeat |
783 the function's signature. |
780 the function's signature. |
784 </p> |
781 </p> |
|
782 |
785 <dl> |
783 <dl> |
786 |
784 |
787 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
785 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
788 <dd> |
786 <dd> |
789 docstring context |
787 docstring context |
794 </dd> |
792 </dd> |
795 </dl> |
793 </dl> |
796 <a NAME="DocStyleChecker.__checkOneLiner" ID="DocStyleChecker.__checkOneLiner"></a> |
794 <a NAME="DocStyleChecker.__checkOneLiner" ID="DocStyleChecker.__checkOneLiner"></a> |
797 <h4>DocStyleChecker.__checkOneLiner</h4> |
795 <h4>DocStyleChecker.__checkOneLiner</h4> |
798 <b>__checkOneLiner</b>(<i>docstringContext, context</i>) |
796 <b>__checkOneLiner</b>(<i>docstringContext, context</i>) |
799 |
|
800 <p> |
797 <p> |
801 Private method to check, that one-liner docstrings fit on |
798 Private method to check, that one-liner docstrings fit on |
802 one line with quotes. |
799 one line with quotes. |
803 </p> |
800 </p> |
|
801 |
804 <dl> |
802 <dl> |
805 |
803 |
806 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
804 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
807 <dd> |
805 <dd> |
808 docstring context |
806 docstring context |
813 </dd> |
811 </dd> |
814 </dl> |
812 </dl> |
815 <a NAME="DocStyleChecker.__checkReturnType" ID="DocStyleChecker.__checkReturnType"></a> |
813 <a NAME="DocStyleChecker.__checkReturnType" ID="DocStyleChecker.__checkReturnType"></a> |
816 <h4>DocStyleChecker.__checkReturnType</h4> |
814 <h4>DocStyleChecker.__checkReturnType</h4> |
817 <b>__checkReturnType</b>(<i>docstringContext, context</i>) |
815 <b>__checkReturnType</b>(<i>docstringContext, context</i>) |
818 |
|
819 <p> |
816 <p> |
820 Private method to check, that docstrings mention the return value type. |
817 Private method to check, that docstrings mention the return value type. |
821 </p> |
818 </p> |
|
819 |
822 <dl> |
820 <dl> |
823 |
821 |
824 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
822 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
825 <dd> |
823 <dd> |
826 docstring context |
824 docstring context |
831 </dd> |
829 </dd> |
832 </dl> |
830 </dl> |
833 <a NAME="DocStyleChecker.__checkSummary" ID="DocStyleChecker.__checkSummary"></a> |
831 <a NAME="DocStyleChecker.__checkSummary" ID="DocStyleChecker.__checkSummary"></a> |
834 <h4>DocStyleChecker.__checkSummary</h4> |
832 <h4>DocStyleChecker.__checkSummary</h4> |
835 <b>__checkSummary</b>(<i>docstringContext, context</i>) |
833 <b>__checkSummary</b>(<i>docstringContext, context</i>) |
836 |
|
837 <p> |
834 <p> |
838 Private method to check, that docstring summaries contain some text. |
835 Private method to check, that docstring summaries contain some text. |
839 </p> |
836 </p> |
|
837 |
840 <dl> |
838 <dl> |
841 |
839 |
842 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
840 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
843 <dd> |
841 <dd> |
844 docstring context |
842 docstring context |
849 </dd> |
847 </dd> |
850 </dl> |
848 </dl> |
851 <a NAME="DocStyleChecker.__checkTripleDoubleQuotes" ID="DocStyleChecker.__checkTripleDoubleQuotes"></a> |
849 <a NAME="DocStyleChecker.__checkTripleDoubleQuotes" ID="DocStyleChecker.__checkTripleDoubleQuotes"></a> |
852 <h4>DocStyleChecker.__checkTripleDoubleQuotes</h4> |
850 <h4>DocStyleChecker.__checkTripleDoubleQuotes</h4> |
853 <b>__checkTripleDoubleQuotes</b>(<i>docstringContext, context</i>) |
851 <b>__checkTripleDoubleQuotes</b>(<i>docstringContext, context</i>) |
854 |
|
855 <p> |
852 <p> |
856 Private method to check, that all docstrings are surrounded |
853 Private method to check, that all docstrings are surrounded |
857 by triple double quotes. |
854 by triple double quotes. |
858 </p> |
855 </p> |
|
856 |
859 <dl> |
857 <dl> |
860 |
858 |
861 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
859 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
862 <dd> |
860 <dd> |
863 docstring context |
861 docstring context |
868 </dd> |
866 </dd> |
869 </dl> |
867 </dl> |
870 <a NAME="DocStyleChecker.__error" ID="DocStyleChecker.__error"></a> |
868 <a NAME="DocStyleChecker.__error" ID="DocStyleChecker.__error"></a> |
871 <h4>DocStyleChecker.__error</h4> |
869 <h4>DocStyleChecker.__error</h4> |
872 <b>__error</b>(<i>lineNumber, offset, code, *args</i>) |
870 <b>__error</b>(<i>lineNumber, offset, code, *args</i>) |
873 |
|
874 <p> |
871 <p> |
875 Private method to record an issue. |
872 Private method to record an issue. |
876 </p> |
873 </p> |
|
874 |
877 <dl> |
875 <dl> |
878 |
876 |
879 <dt><i>lineNumber</i> (int)</dt> |
877 <dt><i>lineNumber</i> (int)</dt> |
880 <dd> |
878 <dd> |
881 line number of the issue |
879 line number of the issue |
894 </dd> |
892 </dd> |
895 </dl> |
893 </dl> |
896 <a NAME="DocStyleChecker.__getArgNames" ID="DocStyleChecker.__getArgNames"></a> |
894 <a NAME="DocStyleChecker.__getArgNames" ID="DocStyleChecker.__getArgNames"></a> |
897 <h4>DocStyleChecker.__getArgNames</h4> |
895 <h4>DocStyleChecker.__getArgNames</h4> |
898 <b>__getArgNames</b>(<i>node</i>) |
896 <b>__getArgNames</b>(<i>node</i>) |
899 |
|
900 <p> |
897 <p> |
901 Private method to get the argument names of a function node. |
898 Private method to get the argument names of a function node. |
902 </p> |
899 </p> |
|
900 |
903 <dl> |
901 <dl> |
904 |
902 |
905 <dt><i>node</i> (ast.AST)</dt> |
903 <dt><i>node</i> (ast.AST)</dt> |
906 <dd> |
904 <dd> |
907 AST node to extract arguments names from |
905 AST node to extract arguments names from |
921 </dd> |
919 </dd> |
922 </dl> |
920 </dl> |
923 <a NAME="DocStyleChecker.__getSummaryLine" ID="DocStyleChecker.__getSummaryLine"></a> |
921 <a NAME="DocStyleChecker.__getSummaryLine" ID="DocStyleChecker.__getSummaryLine"></a> |
924 <h4>DocStyleChecker.__getSummaryLine</h4> |
922 <h4>DocStyleChecker.__getSummaryLine</h4> |
925 <b>__getSummaryLine</b>(<i>docstringContext</i>) |
923 <b>__getSummaryLine</b>(<i>docstringContext</i>) |
926 |
|
927 <p> |
924 <p> |
928 Private method to extract the summary line. |
925 Private method to extract the summary line. |
929 </p> |
926 </p> |
|
927 |
930 <dl> |
928 <dl> |
931 |
929 |
932 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
930 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
933 <dd> |
931 <dd> |
934 docstring context |
932 docstring context |
947 </dd> |
945 </dd> |
948 </dl> |
946 </dl> |
949 <a NAME="DocStyleChecker.__getSummaryLines" ID="DocStyleChecker.__getSummaryLines"></a> |
947 <a NAME="DocStyleChecker.__getSummaryLines" ID="DocStyleChecker.__getSummaryLines"></a> |
950 <h4>DocStyleChecker.__getSummaryLines</h4> |
948 <h4>DocStyleChecker.__getSummaryLines</h4> |
951 <b>__getSummaryLines</b>(<i>docstringContext</i>) |
949 <b>__getSummaryLines</b>(<i>docstringContext</i>) |
952 |
|
953 <p> |
950 <p> |
954 Private method to extract the summary lines. |
951 Private method to extract the summary lines. |
955 </p> |
952 </p> |
|
953 |
956 <dl> |
954 <dl> |
957 |
955 |
958 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
956 <dt><i>docstringContext</i> (DocStyleContext)</dt> |
959 <dd> |
957 <dd> |
960 docstring context |
958 docstring context |
973 </dd> |
971 </dd> |
974 </dl> |
972 </dl> |
975 <a NAME="DocStyleChecker.__ignoreCode" ID="DocStyleChecker.__ignoreCode"></a> |
973 <a NAME="DocStyleChecker.__ignoreCode" ID="DocStyleChecker.__ignoreCode"></a> |
976 <h4>DocStyleChecker.__ignoreCode</h4> |
974 <h4>DocStyleChecker.__ignoreCode</h4> |
977 <b>__ignoreCode</b>(<i>code</i>) |
975 <b>__ignoreCode</b>(<i>code</i>) |
978 |
|
979 <p> |
976 <p> |
980 Private method to check if the error code should be ignored. |
977 Private method to check if the error code should be ignored. |
981 </p> |
978 </p> |
|
979 |
982 <dl> |
980 <dl> |
983 |
981 |
984 <dt><i>code</i> (str)</dt> |
982 <dt><i>code</i> (str)</dt> |
985 <dd> |
983 <dd> |
986 message code to check for |
984 message code to check for |
999 </dd> |
997 </dd> |
1000 </dl> |
998 </dl> |
1001 <a NAME="DocStyleChecker.__parseClasses" ID="DocStyleChecker.__parseClasses"></a> |
999 <a NAME="DocStyleChecker.__parseClasses" ID="DocStyleChecker.__parseClasses"></a> |
1002 <h4>DocStyleChecker.__parseClasses</h4> |
1000 <h4>DocStyleChecker.__parseClasses</h4> |
1003 <b>__parseClasses</b>(<i></i>) |
1001 <b>__parseClasses</b>(<i></i>) |
1004 |
|
1005 <p> |
1002 <p> |
1006 Private method to extract top-level classes. |
1003 Private method to extract top-level classes. |
1007 </p> |
1004 </p> |
|
1005 |
1008 <dl> |
1006 <dl> |
1009 <dt>Return:</dt> |
1007 <dt>Return:</dt> |
1010 <dd> |
1008 <dd> |
1011 extracted class contexts |
1009 extracted class contexts |
1012 </dd> |
1010 </dd> |
1018 </dd> |
1016 </dd> |
1019 </dl> |
1017 </dl> |
1020 <a NAME="DocStyleChecker.__parseContexts" ID="DocStyleChecker.__parseContexts"></a> |
1018 <a NAME="DocStyleChecker.__parseContexts" ID="DocStyleChecker.__parseContexts"></a> |
1021 <h4>DocStyleChecker.__parseContexts</h4> |
1019 <h4>DocStyleChecker.__parseContexts</h4> |
1022 <b>__parseContexts</b>(<i>kind</i>) |
1020 <b>__parseContexts</b>(<i>kind</i>) |
1023 |
|
1024 <p> |
1021 <p> |
1025 Private method to extract a context from the source. |
1022 Private method to extract a context from the source. |
1026 </p> |
1023 </p> |
|
1024 |
1027 <dl> |
1025 <dl> |
1028 |
1026 |
1029 <dt><i>kind</i> (str)</dt> |
1027 <dt><i>kind</i> (str)</dt> |
1030 <dd> |
1028 <dd> |
1031 kind of context to extract |
1029 kind of context to extract |
1044 </dd> |
1042 </dd> |
1045 </dl> |
1043 </dl> |
1046 <a NAME="DocStyleChecker.__parseDocstring" ID="DocStyleChecker.__parseDocstring"></a> |
1044 <a NAME="DocStyleChecker.__parseDocstring" ID="DocStyleChecker.__parseDocstring"></a> |
1047 <h4>DocStyleChecker.__parseDocstring</h4> |
1045 <h4>DocStyleChecker.__parseDocstring</h4> |
1048 <b>__parseDocstring</b>(<i>context, what=""</i>) |
1046 <b>__parseDocstring</b>(<i>context, what=""</i>) |
1049 |
|
1050 <p> |
1047 <p> |
1051 Private method to extract a docstring given `def` or `class` source. |
1048 Private method to extract a docstring given `def` or `class` source. |
1052 </p> |
1049 </p> |
|
1050 |
1053 <dl> |
1051 <dl> |
1054 |
1052 |
1055 <dt><i>context</i> (DocStyleContext)</dt> |
1053 <dt><i>context</i> (DocStyleContext)</dt> |
1056 <dd> |
1054 <dd> |
1057 context data to get the docstring from |
1055 context data to get the docstring from |
1074 </dd> |
1072 </dd> |
1075 </dl> |
1073 </dl> |
1076 <a NAME="DocStyleChecker.__parseFunctions" ID="DocStyleChecker.__parseFunctions"></a> |
1074 <a NAME="DocStyleChecker.__parseFunctions" ID="DocStyleChecker.__parseFunctions"></a> |
1077 <h4>DocStyleChecker.__parseFunctions</h4> |
1075 <h4>DocStyleChecker.__parseFunctions</h4> |
1078 <b>__parseFunctions</b>(<i></i>) |
1076 <b>__parseFunctions</b>(<i></i>) |
1079 |
|
1080 <p> |
1077 <p> |
1081 Private method to extract top-level functions. |
1078 Private method to extract top-level functions. |
1082 </p> |
1079 </p> |
|
1080 |
1083 <dl> |
1081 <dl> |
1084 <dt>Return:</dt> |
1082 <dt>Return:</dt> |
1085 <dd> |
1083 <dd> |
1086 extracted function contexts |
1084 extracted function contexts |
1087 </dd> |
1085 </dd> |
1093 </dd> |
1091 </dd> |
1094 </dl> |
1092 </dl> |
1095 <a NAME="DocStyleChecker.__parseMethods" ID="DocStyleChecker.__parseMethods"></a> |
1093 <a NAME="DocStyleChecker.__parseMethods" ID="DocStyleChecker.__parseMethods"></a> |
1096 <h4>DocStyleChecker.__parseMethods</h4> |
1094 <h4>DocStyleChecker.__parseMethods</h4> |
1097 <b>__parseMethods</b>(<i></i>) |
1095 <b>__parseMethods</b>(<i></i>) |
1098 |
|
1099 <p> |
1096 <p> |
1100 Private method to extract methods of all classes. |
1097 Private method to extract methods of all classes. |
1101 </p> |
1098 </p> |
|
1099 |
1102 <dl> |
1100 <dl> |
1103 <dt>Return:</dt> |
1101 <dt>Return:</dt> |
1104 <dd> |
1102 <dd> |
1105 extracted method contexts |
1103 extracted method contexts |
1106 </dd> |
1104 </dd> |
1112 </dd> |
1110 </dd> |
1113 </dl> |
1111 </dl> |
1114 <a NAME="DocStyleChecker.__parseModuleDocstring" ID="DocStyleChecker.__parseModuleDocstring"></a> |
1112 <a NAME="DocStyleChecker.__parseModuleDocstring" ID="DocStyleChecker.__parseModuleDocstring"></a> |
1115 <h4>DocStyleChecker.__parseModuleDocstring</h4> |
1113 <h4>DocStyleChecker.__parseModuleDocstring</h4> |
1116 <b>__parseModuleDocstring</b>(<i>source</i>) |
1114 <b>__parseModuleDocstring</b>(<i>source</i>) |
1117 |
|
1118 <p> |
1115 <p> |
1119 Private method to extract a docstring given a module source. |
1116 Private method to extract a docstring given a module source. |
1120 </p> |
1117 </p> |
|
1118 |
1121 <dl> |
1119 <dl> |
1122 |
1120 |
1123 <dt><i>source</i> (list of str)</dt> |
1121 <dt><i>source</i> (list of str)</dt> |
1124 <dd> |
1122 <dd> |
1125 source to parse |
1123 source to parse |
1138 </dd> |
1136 </dd> |
1139 </dl> |
1137 </dl> |
1140 <a NAME="DocStyleChecker.__parseTopLevel" ID="DocStyleChecker.__parseTopLevel"></a> |
1138 <a NAME="DocStyleChecker.__parseTopLevel" ID="DocStyleChecker.__parseTopLevel"></a> |
1141 <h4>DocStyleChecker.__parseTopLevel</h4> |
1139 <h4>DocStyleChecker.__parseTopLevel</h4> |
1142 <b>__parseTopLevel</b>(<i>keyword</i>) |
1140 <b>__parseTopLevel</b>(<i>keyword</i>) |
1143 |
|
1144 <p> |
1141 <p> |
1145 Private method to extract top-level functions or classes. |
1142 Private method to extract top-level functions or classes. |
1146 </p> |
1143 </p> |
|
1144 |
1147 <dl> |
1145 <dl> |
1148 |
1146 |
1149 <dt><i>keyword</i> (str)</dt> |
1147 <dt><i>keyword</i> (str)</dt> |
1150 <dd> |
1148 <dd> |
1151 keyword signaling what to extract |
1149 keyword signaling what to extract |
1183 </dd> |
1181 </dd> |
1184 </dl> |
1182 </dl> |
1185 <a NAME="DocStyleChecker.__resetReadline" ID="DocStyleChecker.__resetReadline"></a> |
1183 <a NAME="DocStyleChecker.__resetReadline" ID="DocStyleChecker.__resetReadline"></a> |
1186 <h4>DocStyleChecker.__resetReadline</h4> |
1184 <h4>DocStyleChecker.__resetReadline</h4> |
1187 <b>__resetReadline</b>(<i></i>) |
1185 <b>__resetReadline</b>(<i></i>) |
1188 |
|
1189 <p> |
1186 <p> |
1190 Private method to reset the internal readline function. |
1187 Private method to reset the internal readline function. |
1191 </p> |
1188 </p> |
|
1189 |
1192 <a NAME="DocStyleChecker.__skipIndentedBlock" ID="DocStyleChecker.__skipIndentedBlock"></a> |
1190 <a NAME="DocStyleChecker.__skipIndentedBlock" ID="DocStyleChecker.__skipIndentedBlock"></a> |
1193 <h4>DocStyleChecker.__skipIndentedBlock</h4> |
1191 <h4>DocStyleChecker.__skipIndentedBlock</h4> |
1194 <b>__skipIndentedBlock</b>(<i>tokenGenerator</i>) |
1192 <b>__skipIndentedBlock</b>(<i>tokenGenerator</i>) |
1195 |
|
1196 <p> |
1193 <p> |
1197 Private method to skip over an indented block of source code. |
1194 Private method to skip over an indented block of source code. |
1198 </p> |
1195 </p> |
|
1196 |
1199 <dl> |
1197 <dl> |
1200 |
1198 |
1201 <dt><i>tokenGenerator</i> (str iterator)</dt> |
1199 <dt><i>tokenGenerator</i> (str iterator)</dt> |
1202 <dd> |
1200 <dd> |
1203 token generator |
1201 token generator |
1216 </dd> |
1214 </dd> |
1217 </dl> |
1215 </dl> |
1218 <a NAME="DocStyleChecker.run" ID="DocStyleChecker.run"></a> |
1216 <a NAME="DocStyleChecker.run" ID="DocStyleChecker.run"></a> |
1219 <h4>DocStyleChecker.run</h4> |
1217 <h4>DocStyleChecker.run</h4> |
1220 <b>run</b>(<i></i>) |
1218 <b>run</b>(<i></i>) |
1221 |
|
1222 <p> |
1219 <p> |
1223 Public method to check the given source for violations of doc string |
1220 Public method to check the given source for violations of doc string |
1224 conventions. |
1221 conventions. |
1225 </p> |
1222 </p> |
|
1223 |
1226 <div align="right"><a href="#top">Up</a></div> |
1224 <div align="right"><a href="#top">Up</a></div> |
1227 <hr /> |
1225 <hr /> |
1228 <hr /> |
1226 <hr /> |
1229 <a NAME="DocStyleContext" ID="DocStyleContext"></a> |
1227 <a NAME="DocStyleContext" ID="DocStyleContext"></a> |
1230 <h2>DocStyleContext</h2> |
1228 <h2>DocStyleContext</h2> |
1231 |
|
1232 <p> |
1229 <p> |
1233 Class implementing the source context. |
1230 Class implementing the source context. |
1234 </p> |
1231 </p> |
|
1232 |
1235 <h3>Derived from</h3> |
1233 <h3>Derived from</h3> |
1236 None |
1234 None |
1237 <h3>Class Attributes</h3> |
1235 <h3>Class Attributes</h3> |
1238 |
|
1239 <table> |
1236 <table> |
1240 <tr><td>None</td></tr> |
1237 <tr><td>None</td></tr> |
1241 </table> |
1238 </table> |
|
1239 |
1242 <h3>Class Methods</h3> |
1240 <h3>Class Methods</h3> |
1243 |
|
1244 <table> |
1241 <table> |
1245 <tr><td>None</td></tr> |
1242 <tr><td>None</td></tr> |
1246 </table> |
1243 </table> |
|
1244 |
1247 <h3>Methods</h3> |
1245 <h3>Methods</h3> |
1248 |
|
1249 <table> |
1246 <table> |
1250 |
|
1251 <tr> |
1247 <tr> |
1252 <td><a href="#DocStyleContext.__init__">DocStyleContext</a></td> |
1248 <td><a href="#DocStyleContext.__init__">DocStyleContext</a></td> |
1253 <td>Constructor</td> |
1249 <td>Constructor</td> |
1254 </tr> |
1250 </tr> |
1255 <tr> |
1251 <tr> |
1283 <tr> |
1279 <tr> |
1284 <td><a href="#DocStyleContext.start">start</a></td> |
1280 <td><a href="#DocStyleContext.start">start</a></td> |
1285 <td>Public method to get the start line number.</td> |
1281 <td>Public method to get the start line number.</td> |
1286 </tr> |
1282 </tr> |
1287 </table> |
1283 </table> |
|
1284 |
1288 <h3>Static Methods</h3> |
1285 <h3>Static Methods</h3> |
1289 |
|
1290 <table> |
1286 <table> |
1291 <tr><td>None</td></tr> |
1287 <tr><td>None</td></tr> |
1292 </table> |
1288 </table> |
1293 |
1289 |
|
1290 |
1294 <a NAME="DocStyleContext.__init__" ID="DocStyleContext.__init__"></a> |
1291 <a NAME="DocStyleContext.__init__" ID="DocStyleContext.__init__"></a> |
1295 <h4>DocStyleContext (Constructor)</h4> |
1292 <h4>DocStyleContext (Constructor)</h4> |
1296 <b>DocStyleContext</b>(<i>source, startLine, contextType</i>) |
1293 <b>DocStyleContext</b>(<i>source, startLine, contextType</i>) |
1297 |
|
1298 <p> |
1294 <p> |
1299 Constructor |
1295 Constructor |
1300 </p> |
1296 </p> |
|
1297 |
1301 <dl> |
1298 <dl> |
1302 |
1299 |
1303 <dt><i>source</i> (list of str or str)</dt> |
1300 <dt><i>source</i> (list of str or str)</dt> |
1304 <dd> |
1301 <dd> |
1305 source code of the context |
1302 source code of the context |
1371 </dd> |
1368 </dd> |
1372 </dl> |
1369 </dl> |
1373 <a NAME="DocStyleContext.setSpecial" ID="DocStyleContext.setSpecial"></a> |
1370 <a NAME="DocStyleContext.setSpecial" ID="DocStyleContext.setSpecial"></a> |
1374 <h4>DocStyleContext.setSpecial</h4> |
1371 <h4>DocStyleContext.setSpecial</h4> |
1375 <b>setSpecial</b>(<i>special</i>) |
1372 <b>setSpecial</b>(<i>special</i>) |
1376 |
|
1377 <p> |
1373 <p> |
1378 Public method to set a special attribute for the context. |
1374 Public method to set a special attribute for the context. |
1379 </p> |
1375 </p> |
|
1376 |
1380 <dl> |
1377 <dl> |
1381 |
1378 |
1382 <dt><i>special</i> (str)</dt> |
1379 <dt><i>special</i> (str)</dt> |
1383 <dd> |
1380 <dd> |
1384 attribute string |
1381 attribute string |
1385 </dd> |
1382 </dd> |
1386 </dl> |
1383 </dl> |
1387 <a NAME="DocStyleContext.source" ID="DocStyleContext.source"></a> |
1384 <a NAME="DocStyleContext.source" ID="DocStyleContext.source"></a> |
1388 <h4>DocStyleContext.source</h4> |
1385 <h4>DocStyleContext.source</h4> |
1389 <b>source</b>(<i></i>) |
1386 <b>source</b>(<i></i>) |
1390 |
|
1391 <p> |
1387 <p> |
1392 Public method to get the source. |
1388 Public method to get the source. |
1393 </p> |
1389 </p> |
|
1390 |
1394 <dl> |
1391 <dl> |
1395 <dt>Return:</dt> |
1392 <dt>Return:</dt> |
1396 <dd> |
1393 <dd> |
1397 source |
1394 source |
1398 </dd> |
1395 </dd> |