src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Simplify.SimplifyNodeVisitor.html

branch
eric7
changeset 10479
856476537696
parent 10358
957c9de01d42
child 11141
2f5f73c51c7c
equal deleted inserted replaced
10478:de9106c55c3d 10479:856476537696
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.Simplify.SimplifyNodeVisitor</h1> 9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Simplify.SimplifyNodeVisitor</h1>
10
11 <p> 10 <p>
12 Module implementing a node visitor checking for code that could be simplified. 11 Module implementing a node visitor checking for code that could be simplified.
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="#SimplifyNodeVisitor">SimplifyNodeVisitor</a></td> 22 <td><a href="#SimplifyNodeVisitor">SimplifyNodeVisitor</a></td>
25 <td>Class to traverse the AST node tree and check for code that can be simplified.</td> 23 <td>Class to traverse the AST node tree and check for code that can be simplified.</td>
26 </tr> 24 </tr>
27 </table> 25 </table>
26
28 <h3>Functions</h3> 27 <h3>Functions</h3>
29
30 <table> 28 <table>
31 <tr><td>None</td></tr> 29 <tr><td>None</td></tr>
32 </table> 30 </table>
31
33 <hr /> 32 <hr />
34 <hr /> 33 <hr />
35 <a NAME="SimplifyNodeVisitor" ID="SimplifyNodeVisitor"></a> 34 <a NAME="SimplifyNodeVisitor" ID="SimplifyNodeVisitor"></a>
36 <h2>SimplifyNodeVisitor</h2> 35 <h2>SimplifyNodeVisitor</h2>
37
38 <p> 36 <p>
39 Class to traverse the AST node tree and check for code that can be 37 Class to traverse the AST node tree and check for code that can be
40 simplified. 38 simplified.
41 </p> 39 </p>
40
42 <h3>Derived from</h3> 41 <h3>Derived from</h3>
43 ast.NodeVisitor 42 ast.NodeVisitor
44 <h3>Class Attributes</h3> 43 <h3>Class Attributes</h3>
45
46 <table> 44 <table>
47 <tr><td>None</td></tr> 45 <tr><td>None</td></tr>
48 </table> 46 </table>
47
49 <h3>Class Methods</h3> 48 <h3>Class Methods</h3>
50
51 <table> 49 <table>
52 <tr><td>None</td></tr> 50 <tr><td>None</td></tr>
53 </table> 51 </table>
52
54 <h3>Methods</h3> 53 <h3>Methods</h3>
55
56 <table> 54 <table>
57
58 <tr> 55 <tr>
59 <td><a href="#SimplifyNodeVisitor.__init__">SimplifyNodeVisitor</a></td> 56 <td><a href="#SimplifyNodeVisitor.__init__">SimplifyNodeVisitor</a></td>
60 <td>Constructor</td> 57 <td>Constructor</td>
61 </tr> 58 </tr>
62 <tr> 59 <tr>
350 <tr> 347 <tr>
351 <td><a href="#SimplifyNodeVisitor.visit_With">visit_With</a></td> 348 <td><a href="#SimplifyNodeVisitor.visit_With">visit_With</a></td>
352 <td>Public method to process a With node.</td> 349 <td>Public method to process a With node.</td>
353 </tr> 350 </tr>
354 </table> 351 </table>
352
355 <h3>Static Methods</h3> 353 <h3>Static Methods</h3>
356
357 <table> 354 <table>
358 <tr><td>None</td></tr> 355 <tr><td>None</td></tr>
359 </table> 356 </table>
360 357
358
361 <a NAME="SimplifyNodeVisitor.__init__" ID="SimplifyNodeVisitor.__init__"></a> 359 <a NAME="SimplifyNodeVisitor.__init__" ID="SimplifyNodeVisitor.__init__"></a>
362 <h4>SimplifyNodeVisitor (Constructor)</h4> 360 <h4>SimplifyNodeVisitor (Constructor)</h4>
363 <b>SimplifyNodeVisitor</b>(<i>errorCallback</i>) 361 <b>SimplifyNodeVisitor</b>(<i>errorCallback</i>)
364
365 <p> 362 <p>
366 Constructor 363 Constructor
367 </p> 364 </p>
365
368 <dl> 366 <dl>
369 367
370 <dt><i>errorCallback</i> (func)</dt> 368 <dt><i>errorCallback</i> (func)</dt>
371 <dd> 369 <dd>
372 callback function to register an error 370 callback function to register an error
373 </dd> 371 </dd>
374 </dl> 372 </dl>
375 <a NAME="SimplifyNodeVisitor.__bodyContainsContinue" ID="SimplifyNodeVisitor.__bodyContainsContinue"></a> 373 <a NAME="SimplifyNodeVisitor.__bodyContainsContinue" ID="SimplifyNodeVisitor.__bodyContainsContinue"></a>
376 <h4>SimplifyNodeVisitor.__bodyContainsContinue</h4> 374 <h4>SimplifyNodeVisitor.__bodyContainsContinue</h4>
377 <b>__bodyContainsContinue</b>(<i>stmts</i>) 375 <b>__bodyContainsContinue</b>(<i>stmts</i>)
378
379 <p> 376 <p>
380 Private method to check, if a list of statements contain a 'continue' statement. 377 Private method to check, if a list of statements contain a 'continue' statement.
381 </p> 378 </p>
379
382 <dl> 380 <dl>
383 381
384 <dt><i>stmts</i> (list of ast.stmt)</dt> 382 <dt><i>stmts</i> (list of ast.stmt)</dt>
385 <dd> 383 <dd>
386 list of statements 384 list of statements
399 </dd> 397 </dd>
400 </dl> 398 </dl>
401 <a NAME="SimplifyNodeVisitor.__check101" ID="SimplifyNodeVisitor.__check101"></a> 399 <a NAME="SimplifyNodeVisitor.__check101" ID="SimplifyNodeVisitor.__check101"></a>
402 <h4>SimplifyNodeVisitor.__check101</h4> 400 <h4>SimplifyNodeVisitor.__check101</h4>
403 <b>__check101</b>(<i>node</i>) 401 <b>__check101</b>(<i>node</i>)
404
405 <p> 402 <p>
406 Private method to check for duplicate isinstance() calls. 403 Private method to check for duplicate isinstance() calls.
407 </p> 404 </p>
405
408 <dl> 406 <dl>
409 407
410 <dt><i>node</i> (ast.BoolOp)</dt> 408 <dt><i>node</i> (ast.BoolOp)</dt>
411 <dd> 409 <dd>
412 reference to the AST node to be checked 410 reference to the AST node to be checked
413 </dd> 411 </dd>
414 </dl> 412 </dl>
415 <a NAME="SimplifyNodeVisitor.__check102" ID="SimplifyNodeVisitor.__check102"></a> 413 <a NAME="SimplifyNodeVisitor.__check102" ID="SimplifyNodeVisitor.__check102"></a>
416 <h4>SimplifyNodeVisitor.__check102</h4> 414 <h4>SimplifyNodeVisitor.__check102</h4>
417 <b>__check102</b>(<i>node</i>) 415 <b>__check102</b>(<i>node</i>)
418
419 <p> 416 <p>
420 Private method to check for nested if statements without else blocks. 417 Private method to check for nested if statements without else blocks.
421 </p> 418 </p>
419
422 <dl> 420 <dl>
423 421
424 <dt><i>node</i> (ast.If)</dt> 422 <dt><i>node</i> (ast.If)</dt>
425 <dd> 423 <dd>
426 reference to the AST node to be checked 424 reference to the AST node to be checked
427 </dd> 425 </dd>
428 </dl> 426 </dl>
429 <a NAME="SimplifyNodeVisitor.__check103" ID="SimplifyNodeVisitor.__check103"></a> 427 <a NAME="SimplifyNodeVisitor.__check103" ID="SimplifyNodeVisitor.__check103"></a>
430 <h4>SimplifyNodeVisitor.__check103</h4> 428 <h4>SimplifyNodeVisitor.__check103</h4>
431 <b>__check103</b>(<i>node</i>) 429 <b>__check103</b>(<i>node</i>)
432
433 <p> 430 <p>
434 Private method to check for calls that wrap a condition to return 431 Private method to check for calls that wrap a condition to return
435 a bool. 432 a bool.
436 </p> 433 </p>
434
437 <dl> 435 <dl>
438 436
439 <dt><i>node</i> (ast.If)</dt> 437 <dt><i>node</i> (ast.If)</dt>
440 <dd> 438 <dd>
441 reference to the AST node to be checked 439 reference to the AST node to be checked
442 </dd> 440 </dd>
443 </dl> 441 </dl>
444 <a NAME="SimplifyNodeVisitor.__check104" ID="SimplifyNodeVisitor.__check104"></a> 442 <a NAME="SimplifyNodeVisitor.__check104" ID="SimplifyNodeVisitor.__check104"></a>
445 <h4>SimplifyNodeVisitor.__check104</h4> 443 <h4>SimplifyNodeVisitor.__check104</h4>
446 <b>__check104</b>(<i>node</i>) 444 <b>__check104</b>(<i>node</i>)
447
448 <p> 445 <p>
449 Private method to check for "iterate and yield" patterns. 446 Private method to check for "iterate and yield" patterns.
450 </p> 447 </p>
448
451 <dl> 449 <dl>
452 450
453 <dt><i>node</i> (ast.For)</dt> 451 <dt><i>node</i> (ast.For)</dt>
454 <dd> 452 <dd>
455 reference to the AST node to be checked 453 reference to the AST node to be checked
456 </dd> 454 </dd>
457 </dl> 455 </dl>
458 <a NAME="SimplifyNodeVisitor.__check105" ID="SimplifyNodeVisitor.__check105"></a> 456 <a NAME="SimplifyNodeVisitor.__check105" ID="SimplifyNodeVisitor.__check105"></a>
459 <h4>SimplifyNodeVisitor.__check105</h4> 457 <h4>SimplifyNodeVisitor.__check105</h4>
460 <b>__check105</b>(<i>node</i>) 458 <b>__check105</b>(<i>node</i>)
461
462 <p> 459 <p>
463 Private method to check for "try-except-pass" patterns. 460 Private method to check for "try-except-pass" patterns.
464 </p> 461 </p>
462
465 <dl> 463 <dl>
466 464
467 <dt><i>node</i> (ast.Try)</dt> 465 <dt><i>node</i> (ast.Try)</dt>
468 <dd> 466 <dd>
469 reference to the AST node to be checked 467 reference to the AST node to be checked
470 </dd> 468 </dd>
471 </dl> 469 </dl>
472 <a NAME="SimplifyNodeVisitor.__check106" ID="SimplifyNodeVisitor.__check106"></a> 470 <a NAME="SimplifyNodeVisitor.__check106" ID="SimplifyNodeVisitor.__check106"></a>
473 <h4>SimplifyNodeVisitor.__check106</h4> 471 <h4>SimplifyNodeVisitor.__check106</h4>
474 <b>__check106</b>(<i>node</i>) 472 <b>__check106</b>(<i>node</i>)
475
476 <p> 473 <p>
477 Private method to check for calls where an exception is raised in else. 474 Private method to check for calls where an exception is raised in else.
478 </p> 475 </p>
476
479 <dl> 477 <dl>
480 478
481 <dt><i>node</i> (ast.If)</dt> 479 <dt><i>node</i> (ast.If)</dt>
482 <dd> 480 <dd>
483 reference to the AST node to be checked 481 reference to the AST node to be checked
484 </dd> 482 </dd>
485 </dl> 483 </dl>
486 <a NAME="SimplifyNodeVisitor.__check107" ID="SimplifyNodeVisitor.__check107"></a> 484 <a NAME="SimplifyNodeVisitor.__check107" ID="SimplifyNodeVisitor.__check107"></a>
487 <h4>SimplifyNodeVisitor.__check107</h4> 485 <h4>SimplifyNodeVisitor.__check107</h4>
488 <b>__check107</b>(<i>node</i>) 486 <b>__check107</b>(<i>node</i>)
489
490 <p> 487 <p>
491 Private method to check for calls where try/except and finally have 488 Private method to check for calls where try/except and finally have
492 'return'. 489 'return'.
493 </p> 490 </p>
491
494 <dl> 492 <dl>
495 493
496 <dt><i>node</i> (ast.Try)</dt> 494 <dt><i>node</i> (ast.Try)</dt>
497 <dd> 495 <dd>
498 reference to the AST node to be checked 496 reference to the AST node to be checked
499 </dd> 497 </dd>
500 </dl> 498 </dl>
501 <a NAME="SimplifyNodeVisitor.__check108" ID="SimplifyNodeVisitor.__check108"></a> 499 <a NAME="SimplifyNodeVisitor.__check108" ID="SimplifyNodeVisitor.__check108"></a>
502 <h4>SimplifyNodeVisitor.__check108</h4> 500 <h4>SimplifyNodeVisitor.__check108</h4>
503 <b>__check108</b>(<i>node</i>) 501 <b>__check108</b>(<i>node</i>)
504
505 <p> 502 <p>
506 Private method to check for if-elses which could be a ternary 503 Private method to check for if-elses which could be a ternary
507 operator assignment. 504 operator assignment.
508 </p> 505 </p>
506
509 <dl> 507 <dl>
510 508
511 <dt><i>node</i> (ast.If)</dt> 509 <dt><i>node</i> (ast.If)</dt>
512 <dd> 510 <dd>
513 reference to the AST node to be checked 511 reference to the AST node to be checked
514 </dd> 512 </dd>
515 </dl> 513 </dl>
516 <a NAME="SimplifyNodeVisitor.__check109" ID="SimplifyNodeVisitor.__check109"></a> 514 <a NAME="SimplifyNodeVisitor.__check109" ID="SimplifyNodeVisitor.__check109"></a>
517 <h4>SimplifyNodeVisitor.__check109</h4> 515 <h4>SimplifyNodeVisitor.__check109</h4>
518 <b>__check109</b>(<i>node</i>) 516 <b>__check109</b>(<i>node</i>)
519
520 <p> 517 <p>
521 Private method to check for multiple equalities with the same value 518 Private method to check for multiple equalities with the same value
522 are combined via "or". 519 are combined via "or".
523 </p> 520 </p>
521
524 <dl> 522 <dl>
525 523
526 <dt><i>node</i> (ast.BoolOp)</dt> 524 <dt><i>node</i> (ast.BoolOp)</dt>
527 <dd> 525 <dd>
528 reference to the AST node to be checked 526 reference to the AST node to be checked
529 </dd> 527 </dd>
530 </dl> 528 </dl>
531 <a NAME="SimplifyNodeVisitor.__check110_111" ID="SimplifyNodeVisitor.__check110_111"></a> 529 <a NAME="SimplifyNodeVisitor.__check110_111" ID="SimplifyNodeVisitor.__check110_111"></a>
532 <h4>SimplifyNodeVisitor.__check110_111</h4> 530 <h4>SimplifyNodeVisitor.__check110_111</h4>
533 <b>__check110_111</b>(<i>node</i>) 531 <b>__check110_111</b>(<i>node</i>)
534
535 <p> 532 <p>
536 Private method to check if any / all could be used. 533 Private method to check if any / all could be used.
537 </p> 534 </p>
535
538 <dl> 536 <dl>
539 537
540 <dt><i>node</i> (ast.For)</dt> 538 <dt><i>node</i> (ast.For)</dt>
541 <dd> 539 <dd>
542 reference to the AST node to be checked 540 reference to the AST node to be checked
543 </dd> 541 </dd>
544 </dl> 542 </dl>
545 <a NAME="SimplifyNodeVisitor.__check112" ID="SimplifyNodeVisitor.__check112"></a> 543 <a NAME="SimplifyNodeVisitor.__check112" ID="SimplifyNodeVisitor.__check112"></a>
546 <h4>SimplifyNodeVisitor.__check112</h4> 544 <h4>SimplifyNodeVisitor.__check112</h4>
547 <b>__check112</b>(<i>node</i>) 545 <b>__check112</b>(<i>node</i>)
548
549 <p> 546 <p>
550 Private method to check for non-capitalized calls to environment 547 Private method to check for non-capitalized calls to environment
551 variables. 548 variables.
552 </p> 549 </p>
550
553 <dl> 551 <dl>
554 552
555 <dt><i>node</i> (ast.Expr)</dt> 553 <dt><i>node</i> (ast.Expr)</dt>
556 <dd> 554 <dd>
557 reference to the AST node to be checked 555 reference to the AST node to be checked
558 </dd> 556 </dd>
559 </dl> 557 </dl>
560 <a NAME="SimplifyNodeVisitor.__check113" ID="SimplifyNodeVisitor.__check113"></a> 558 <a NAME="SimplifyNodeVisitor.__check113" ID="SimplifyNodeVisitor.__check113"></a>
561 <h4>SimplifyNodeVisitor.__check113</h4> 559 <h4>SimplifyNodeVisitor.__check113</h4>
562 <b>__check113</b>(<i>node</i>) 560 <b>__check113</b>(<i>node</i>)
563
564 <p> 561 <p>
565 Private method to check for loops in which "enumerate" should be 562 Private method to check for loops in which "enumerate" should be
566 used. 563 used.
567 </p> 564 </p>
565
568 <dl> 566 <dl>
569 567
570 <dt><i>node</i> (ast.For)</dt> 568 <dt><i>node</i> (ast.For)</dt>
571 <dd> 569 <dd>
572 reference to the AST node to be checked 570 reference to the AST node to be checked
573 </dd> 571 </dd>
574 </dl> 572 </dl>
575 <a NAME="SimplifyNodeVisitor.__check114" ID="SimplifyNodeVisitor.__check114"></a> 573 <a NAME="SimplifyNodeVisitor.__check114" ID="SimplifyNodeVisitor.__check114"></a>
576 <h4>SimplifyNodeVisitor.__check114</h4> 574 <h4>SimplifyNodeVisitor.__check114</h4>
577 <b>__check114</b>(<i>node</i>) 575 <b>__check114</b>(<i>node</i>)
578
579 <p> 576 <p>
580 Private method to check for alternative if clauses with identical 577 Private method to check for alternative if clauses with identical
581 bodies. 578 bodies.
582 </p> 579 </p>
580
583 <dl> 581 <dl>
584 582
585 <dt><i>node</i> (ast.If)</dt> 583 <dt><i>node</i> (ast.If)</dt>
586 <dd> 584 <dd>
587 reference to the AST node to be checked 585 reference to the AST node to be checked
588 </dd> 586 </dd>
589 </dl> 587 </dl>
590 <a NAME="SimplifyNodeVisitor.__check115" ID="SimplifyNodeVisitor.__check115"></a> 588 <a NAME="SimplifyNodeVisitor.__check115" ID="SimplifyNodeVisitor.__check115"></a>
591 <h4>SimplifyNodeVisitor.__check115</h4> 589 <h4>SimplifyNodeVisitor.__check115</h4>
592 <b>__check115</b>(<i>node</i>) 590 <b>__check115</b>(<i>node</i>)
593
594 <p> 591 <p>
595 Private method to to check for places where open() is called without 592 Private method to to check for places where open() is called without
596 a context handler. 593 a context handler.
597 </p> 594 </p>
595
598 <dl> 596 <dl>
599 597
600 <dt><i>node</i> (ast.Call)</dt> 598 <dt><i>node</i> (ast.Call)</dt>
601 <dd> 599 <dd>
602 reference to the AST node to be checked 600 reference to the AST node to be checked
603 </dd> 601 </dd>
604 </dl> 602 </dl>
605 <a NAME="SimplifyNodeVisitor.__check116" ID="SimplifyNodeVisitor.__check116"></a> 603 <a NAME="SimplifyNodeVisitor.__check116" ID="SimplifyNodeVisitor.__check116"></a>
606 <h4>SimplifyNodeVisitor.__check116</h4> 604 <h4>SimplifyNodeVisitor.__check116</h4>
607 <b>__check116</b>(<i>node</i>) 605 <b>__check116</b>(<i>node</i>)
608
609 <p> 606 <p>
610 Private method to check for places with 3 or more consecutive 607 Private method to check for places with 3 or more consecutive
611 if-statements with direct returns. 608 if-statements with direct returns.
612 </p> 609 </p>
613 <p> 610 <p>
614 * Each if-statement must be a check for equality with the 611 * Each if-statement must be a check for equality with the
615 same variable 612 same variable
616 * Each if-statement must just have a "return" 613 * Each if-statement must just have a "return"
617 * Else must also just have a return 614 * Else must also just have a return
618 </p> 615 </p>
616
619 <dl> 617 <dl>
620 618
621 <dt><i>node</i> (ast.If)</dt> 619 <dt><i>node</i> (ast.If)</dt>
622 <dd> 620 <dd>
623 reference to the AST node to be checked 621 reference to the AST node to be checked
624 </dd> 622 </dd>
625 </dl> 623 </dl>
626 <a NAME="SimplifyNodeVisitor.__check117" ID="SimplifyNodeVisitor.__check117"></a> 624 <a NAME="SimplifyNodeVisitor.__check117" ID="SimplifyNodeVisitor.__check117"></a>
627 <h4>SimplifyNodeVisitor.__check117</h4> 625 <h4>SimplifyNodeVisitor.__check117</h4>
628 <b>__check117</b>(<i>node</i>) 626 <b>__check117</b>(<i>node</i>)
629
630 <p> 627 <p>
631 Private method to check for multiple with-statements with same scope. 628 Private method to check for multiple with-statements with same scope.
632 </p> 629 </p>
630
633 <dl> 631 <dl>
634 632
635 <dt><i>node</i> (ast.With)</dt> 633 <dt><i>node</i> (ast.With)</dt>
636 <dd> 634 <dd>
637 reference to the AST node to be checked 635 reference to the AST node to be checked
638 </dd> 636 </dd>
639 </dl> 637 </dl>
640 <a NAME="SimplifyNodeVisitor.__check118" ID="SimplifyNodeVisitor.__check118"></a> 638 <a NAME="SimplifyNodeVisitor.__check118" ID="SimplifyNodeVisitor.__check118"></a>
641 <h4>SimplifyNodeVisitor.__check118</h4> 639 <h4>SimplifyNodeVisitor.__check118</h4>
642 <b>__check118</b>(<i>node</i>) 640 <b>__check118</b>(<i>node</i>)
643
644 <p> 641 <p>
645 Private method to check for usages of "key in dict.keys()". 642 Private method to check for usages of "key in dict.keys()".
646 </p> 643 </p>
644
647 <dl> 645 <dl>
648 646
649 <dt><i>node</i> (ast.Compare or ast.For)</dt> 647 <dt><i>node</i> (ast.Compare or ast.For)</dt>
650 <dd> 648 <dd>
651 reference to the AST node to be checked 649 reference to the AST node to be checked
652 </dd> 650 </dd>
653 </dl> 651 </dl>
654 <a NAME="SimplifyNodeVisitor.__check119" ID="SimplifyNodeVisitor.__check119"></a> 652 <a NAME="SimplifyNodeVisitor.__check119" ID="SimplifyNodeVisitor.__check119"></a>
655 <h4>SimplifyNodeVisitor.__check119</h4> 653 <h4>SimplifyNodeVisitor.__check119</h4>
656 <b>__check119</b>(<i>node</i>) 654 <b>__check119</b>(<i>node</i>)
657
658 <p> 655 <p>
659 Private method to check for classes that should be "dataclasses". 656 Private method to check for classes that should be "dataclasses".
660 </p> 657 </p>
658
661 <dl> 659 <dl>
662 660
663 <dt><i>node</i> (ast.ClassDef)</dt> 661 <dt><i>node</i> (ast.ClassDef)</dt>
664 <dd> 662 <dd>
665 reference to the AST node to be checked 663 reference to the AST node to be checked
666 </dd> 664 </dd>
667 </dl> 665 </dl>
668 <a NAME="SimplifyNodeVisitor.__check120_121" ID="SimplifyNodeVisitor.__check120_121"></a> 666 <a NAME="SimplifyNodeVisitor.__check120_121" ID="SimplifyNodeVisitor.__check120_121"></a>
669 <h4>SimplifyNodeVisitor.__check120_121</h4> 667 <h4>SimplifyNodeVisitor.__check120_121</h4>
670 <b>__check120_121</b>(<i>node</i>) 668 <b>__check120_121</b>(<i>node</i>)
671
672 <p> 669 <p>
673 Private method to check for classes that inherit from object. 670 Private method to check for classes that inherit from object.
674 </p> 671 </p>
672
675 <dl> 673 <dl>
676 674
677 <dt><i>node</i> (ast.ClassDef)</dt> 675 <dt><i>node</i> (ast.ClassDef)</dt>
678 <dd> 676 <dd>
679 reference to the AST node to be checked 677 reference to the AST node to be checked
680 </dd> 678 </dd>
681 </dl> 679 </dl>
682 <a NAME="SimplifyNodeVisitor.__check122" ID="SimplifyNodeVisitor.__check122"></a> 680 <a NAME="SimplifyNodeVisitor.__check122" ID="SimplifyNodeVisitor.__check122"></a>
683 <h4>SimplifyNodeVisitor.__check122</h4> 681 <h4>SimplifyNodeVisitor.__check122</h4>
684 <b>__check122</b>(<i>node</i>) 682 <b>__check122</b>(<i>node</i>)
685
686 <p> 683 <p>
687 Private method to check for all if-blocks which only check if a key 684 Private method to check for all if-blocks which only check if a key
688 is in a dictionary. 685 is in a dictionary.
689 </p> 686 </p>
687
690 <dl> 688 <dl>
691 689
692 <dt><i>node</i> (ast.If)</dt> 690 <dt><i>node</i> (ast.If)</dt>
693 <dd> 691 <dd>
694 reference to the AST node to be checked 692 reference to the AST node to be checked
695 </dd> 693 </dd>
696 </dl> 694 </dl>
697 <a NAME="SimplifyNodeVisitor.__check123" ID="SimplifyNodeVisitor.__check123"></a> 695 <a NAME="SimplifyNodeVisitor.__check123" ID="SimplifyNodeVisitor.__check123"></a>
698 <h4>SimplifyNodeVisitor.__check123</h4> 696 <h4>SimplifyNodeVisitor.__check123</h4>
699 <b>__check123</b>(<i>node</i>) 697 <b>__check123</b>(<i>node</i>)
700
701 <p> 698 <p>
702 Private method to check for complicated dictionary access with default value. 699 Private method to check for complicated dictionary access with default value.
703 </p> 700 </p>
701
704 <dl> 702 <dl>
705 703
706 <dt><i>node</i> (ast.If)</dt> 704 <dt><i>node</i> (ast.If)</dt>
707 <dd> 705 <dd>
708 reference to the AST node to be checked 706 reference to the AST node to be checked
709 </dd> 707 </dd>
710 </dl> 708 </dl>
711 <a NAME="SimplifyNodeVisitor.__check181" ID="SimplifyNodeVisitor.__check181"></a> 709 <a NAME="SimplifyNodeVisitor.__check181" ID="SimplifyNodeVisitor.__check181"></a>
712 <h4>SimplifyNodeVisitor.__check181</h4> 710 <h4>SimplifyNodeVisitor.__check181</h4>
713 <b>__check181</b>(<i>node</i>) 711 <b>__check181</b>(<i>node</i>)
714
715 <p> 712 <p>
716 Private method to check for assignments that could be converted into 713 Private method to check for assignments that could be converted into
717 an augmented assignment. 714 an augmented assignment.
718 </p> 715 </p>
716
719 <dl> 717 <dl>
720 718
721 <dt><i>node</i> (ast.Assign)</dt> 719 <dt><i>node</i> (ast.Assign)</dt>
722 <dd> 720 <dd>
723 reference to the AST node to be checked 721 reference to the AST node to be checked
724 </dd> 722 </dd>
725 </dl> 723 </dl>
726 <a NAME="SimplifyNodeVisitor.__check182" ID="SimplifyNodeVisitor.__check182"></a> 724 <a NAME="SimplifyNodeVisitor.__check182" ID="SimplifyNodeVisitor.__check182"></a>
727 <h4>SimplifyNodeVisitor.__check182</h4> 725 <h4>SimplifyNodeVisitor.__check182</h4>
728 <b>__check182</b>(<i>node</i>) 726 <b>__check182</b>(<i>node</i>)
729
730 <p> 727 <p>
731 Private method to check for calls of type 'super()' that could 728 Private method to check for calls of type 'super()' that could
732 be shortened to 'super()'. 729 be shortened to 'super()'.
733 </p> 730 </p>
731
734 <dl> 732 <dl>
735 733
736 <dt><i>node</i> (ast.Call)</dt> 734 <dt><i>node</i> (ast.Call)</dt>
737 <dd> 735 <dd>
738 reference to the AST node to be checked 736 reference to the AST node to be checked
739 </dd> 737 </dd>
740 </dl> 738 </dl>
741 <a NAME="SimplifyNodeVisitor.__check201" ID="SimplifyNodeVisitor.__check201"></a> 739 <a NAME="SimplifyNodeVisitor.__check201" ID="SimplifyNodeVisitor.__check201"></a>
742 <h4>SimplifyNodeVisitor.__check201</h4> 740 <h4>SimplifyNodeVisitor.__check201</h4>
743 <b>__check201</b>(<i>node</i>) 741 <b>__check201</b>(<i>node</i>)
744
745 <p> 742 <p>
746 Private method to check for calls where an unary 'not' is used for 743 Private method to check for calls where an unary 'not' is used for
747 an unequality. 744 an unequality.
748 </p> 745 </p>
746
749 <dl> 747 <dl>
750 748
751 <dt><i>node</i> (ast.UnaryOp)</dt> 749 <dt><i>node</i> (ast.UnaryOp)</dt>
752 <dd> 750 <dd>
753 reference to the UnaryOp node 751 reference to the UnaryOp node
754 </dd> 752 </dd>
755 </dl> 753 </dl>
756 <a NAME="SimplifyNodeVisitor.__check202" ID="SimplifyNodeVisitor.__check202"></a> 754 <a NAME="SimplifyNodeVisitor.__check202" ID="SimplifyNodeVisitor.__check202"></a>
757 <h4>SimplifyNodeVisitor.__check202</h4> 755 <h4>SimplifyNodeVisitor.__check202</h4>
758 <b>__check202</b>(<i>node</i>) 756 <b>__check202</b>(<i>node</i>)
759
760 <p> 757 <p>
761 Private method to check for calls where an unary 'not' is used for 758 Private method to check for calls where an unary 'not' is used for
762 an equality. 759 an equality.
763 </p> 760 </p>
761
764 <dl> 762 <dl>
765 763
766 <dt><i>node</i> (ast.UnaryOp)</dt> 764 <dt><i>node</i> (ast.UnaryOp)</dt>
767 <dd> 765 <dd>
768 reference to the UnaryOp node 766 reference to the UnaryOp node
769 </dd> 767 </dd>
770 </dl> 768 </dl>
771 <a NAME="SimplifyNodeVisitor.__check203" ID="SimplifyNodeVisitor.__check203"></a> 769 <a NAME="SimplifyNodeVisitor.__check203" ID="SimplifyNodeVisitor.__check203"></a>
772 <h4>SimplifyNodeVisitor.__check203</h4> 770 <h4>SimplifyNodeVisitor.__check203</h4>
773 <b>__check203</b>(<i>node</i>) 771 <b>__check203</b>(<i>node</i>)
774
775 <p> 772 <p>
776 Private method to check for calls where an unary 'not' is used for 773 Private method to check for calls where an unary 'not' is used for
777 an in-check. 774 an in-check.
778 </p> 775 </p>
776
779 <dl> 777 <dl>
780 778
781 <dt><i>node</i> (ast.UnaryOp)</dt> 779 <dt><i>node</i> (ast.UnaryOp)</dt>
782 <dd> 780 <dd>
783 reference to the UnaryOp node 781 reference to the UnaryOp node
784 </dd> 782 </dd>
785 </dl> 783 </dl>
786 <a NAME="SimplifyNodeVisitor.__check204" ID="SimplifyNodeVisitor.__check204"></a> 784 <a NAME="SimplifyNodeVisitor.__check204" ID="SimplifyNodeVisitor.__check204"></a>
787 <h4>SimplifyNodeVisitor.__check204</h4> 785 <h4>SimplifyNodeVisitor.__check204</h4>
788 <b>__check204</b>(<i>node</i>) 786 <b>__check204</b>(<i>node</i>)
789
790 <p> 787 <p>
791 Private method to check for calls of the type "not (a < b)". 788 Private method to check for calls of the type "not (a < b)".
792 </p> 789 </p>
790
793 <dl> 791 <dl>
794 792
795 <dt><i>node</i> (ast.UnaryOp)</dt> 793 <dt><i>node</i> (ast.UnaryOp)</dt>
796 <dd> 794 <dd>
797 reference to the UnaryOp node 795 reference to the UnaryOp node
798 </dd> 796 </dd>
799 </dl> 797 </dl>
800 <a NAME="SimplifyNodeVisitor.__check205" ID="SimplifyNodeVisitor.__check205"></a> 798 <a NAME="SimplifyNodeVisitor.__check205" ID="SimplifyNodeVisitor.__check205"></a>
801 <h4>SimplifyNodeVisitor.__check205</h4> 799 <h4>SimplifyNodeVisitor.__check205</h4>
802 <b>__check205</b>(<i>node</i>) 800 <b>__check205</b>(<i>node</i>)
803
804 <p> 801 <p>
805 Private method to check for calls of the type "not (a <= b)". 802 Private method to check for calls of the type "not (a <= b)".
806 </p> 803 </p>
804
807 <dl> 805 <dl>
808 806
809 <dt><i>node</i> (ast.UnaryOp)</dt> 807 <dt><i>node</i> (ast.UnaryOp)</dt>
810 <dd> 808 <dd>
811 reference to the UnaryOp node 809 reference to the UnaryOp node
812 </dd> 810 </dd>
813 </dl> 811 </dl>
814 <a NAME="SimplifyNodeVisitor.__check206" ID="SimplifyNodeVisitor.__check206"></a> 812 <a NAME="SimplifyNodeVisitor.__check206" ID="SimplifyNodeVisitor.__check206"></a>
815 <h4>SimplifyNodeVisitor.__check206</h4> 813 <h4>SimplifyNodeVisitor.__check206</h4>
816 <b>__check206</b>(<i>node</i>) 814 <b>__check206</b>(<i>node</i>)
817
818 <p> 815 <p>
819 Private method to check for calls of the type "not (a > b)". 816 Private method to check for calls of the type "not (a > b)".
820 </p> 817 </p>
818
821 <dl> 819 <dl>
822 820
823 <dt><i>node</i> (ast.UnaryOp)</dt> 821 <dt><i>node</i> (ast.UnaryOp)</dt>
824 <dd> 822 <dd>
825 reference to the UnaryOp node 823 reference to the UnaryOp node
826 </dd> 824 </dd>
827 </dl> 825 </dl>
828 <a NAME="SimplifyNodeVisitor.__check207" ID="SimplifyNodeVisitor.__check207"></a> 826 <a NAME="SimplifyNodeVisitor.__check207" ID="SimplifyNodeVisitor.__check207"></a>
829 <h4>SimplifyNodeVisitor.__check207</h4> 827 <h4>SimplifyNodeVisitor.__check207</h4>
830 <b>__check207</b>(<i>node</i>) 828 <b>__check207</b>(<i>node</i>)
831
832 <p> 829 <p>
833 Private method to check for calls of the type "not (a >= b)". 830 Private method to check for calls of the type "not (a >= b)".
834 </p> 831 </p>
832
835 <dl> 833 <dl>
836 834
837 <dt><i>node</i> (ast.UnaryOp)</dt> 835 <dt><i>node</i> (ast.UnaryOp)</dt>
838 <dd> 836 <dd>
839 reference to the UnaryOp node 837 reference to the UnaryOp node
840 </dd> 838 </dd>
841 </dl> 839 </dl>
842 <a NAME="SimplifyNodeVisitor.__check208" ID="SimplifyNodeVisitor.__check208"></a> 840 <a NAME="SimplifyNodeVisitor.__check208" ID="SimplifyNodeVisitor.__check208"></a>
843 <h4>SimplifyNodeVisitor.__check208</h4> 841 <h4>SimplifyNodeVisitor.__check208</h4>
844 <b>__check208</b>(<i>node</i>) 842 <b>__check208</b>(<i>node</i>)
845
846 <p> 843 <p>
847 Private method to check for calls of the type "not (not a)". 844 Private method to check for calls of the type "not (not a)".
848 </p> 845 </p>
846
849 <dl> 847 <dl>
850 848
851 <dt><i>node</i> (ast.UnaryOp)</dt> 849 <dt><i>node</i> (ast.UnaryOp)</dt>
852 <dd> 850 <dd>
853 reference to the UnaryOp node 851 reference to the UnaryOp node
854 </dd> 852 </dd>
855 </dl> 853 </dl>
856 <a NAME="SimplifyNodeVisitor.__check211" ID="SimplifyNodeVisitor.__check211"></a> 854 <a NAME="SimplifyNodeVisitor.__check211" ID="SimplifyNodeVisitor.__check211"></a>
857 <h4>SimplifyNodeVisitor.__check211</h4> 855 <h4>SimplifyNodeVisitor.__check211</h4>
858 <b>__check211</b>(<i>node</i>) 856 <b>__check211</b>(<i>node</i>)
859
860 <p> 857 <p>
861 Private method to check for calls of the type "True if a else False". 858 Private method to check for calls of the type "True if a else False".
862 </p> 859 </p>
860
863 <dl> 861 <dl>
864 862
865 <dt><i>node</i> (ast.IfExp)</dt> 863 <dt><i>node</i> (ast.IfExp)</dt>
866 <dd> 864 <dd>
867 reference to the AST node to be checked 865 reference to the AST node to be checked
868 </dd> 866 </dd>
869 </dl> 867 </dl>
870 <a NAME="SimplifyNodeVisitor.__check212" ID="SimplifyNodeVisitor.__check212"></a> 868 <a NAME="SimplifyNodeVisitor.__check212" ID="SimplifyNodeVisitor.__check212"></a>
871 <h4>SimplifyNodeVisitor.__check212</h4> 869 <h4>SimplifyNodeVisitor.__check212</h4>
872 <b>__check212</b>(<i>node</i>) 870 <b>__check212</b>(<i>node</i>)
873
874 <p> 871 <p>
875 Private method to check for calls of the type "False if a else True". 872 Private method to check for calls of the type "False if a else True".
876 </p> 873 </p>
874
877 <dl> 875 <dl>
878 876
879 <dt><i>node</i> (ast.IfExp)</dt> 877 <dt><i>node</i> (ast.IfExp)</dt>
880 <dd> 878 <dd>
881 reference to the AST node to be checked 879 reference to the AST node to be checked
882 </dd> 880 </dd>
883 </dl> 881 </dl>
884 <a NAME="SimplifyNodeVisitor.__check213" ID="SimplifyNodeVisitor.__check213"></a> 882 <a NAME="SimplifyNodeVisitor.__check213" ID="SimplifyNodeVisitor.__check213"></a>
885 <h4>SimplifyNodeVisitor.__check213</h4> 883 <h4>SimplifyNodeVisitor.__check213</h4>
886 <b>__check213</b>(<i>node</i>) 884 <b>__check213</b>(<i>node</i>)
887
888 <p> 885 <p>
889 Private method to check for calls of the type "b if not a else a". 886 Private method to check for calls of the type "b if not a else a".
890 </p> 887 </p>
888
891 <dl> 889 <dl>
892 890
893 <dt><i>node</i> (ast.IfExp)</dt> 891 <dt><i>node</i> (ast.IfExp)</dt>
894 <dd> 892 <dd>
895 reference to the AST node to be checked 893 reference to the AST node to be checked
896 </dd> 894 </dd>
897 </dl> 895 </dl>
898 <a NAME="SimplifyNodeVisitor.__check221" ID="SimplifyNodeVisitor.__check221"></a> 896 <a NAME="SimplifyNodeVisitor.__check221" ID="SimplifyNodeVisitor.__check221"></a>
899 <h4>SimplifyNodeVisitor.__check221</h4> 897 <h4>SimplifyNodeVisitor.__check221</h4>
900 <b>__check221</b>(<i>node</i>) 898 <b>__check221</b>(<i>node</i>)
901
902 <p> 899 <p>
903 Private method to check for calls of the type "a and not a". 900 Private method to check for calls of the type "a and not a".
904 </p> 901 </p>
902
905 <dl> 903 <dl>
906 904
907 <dt><i>node</i> (ast.BoolOp)</dt> 905 <dt><i>node</i> (ast.BoolOp)</dt>
908 <dd> 906 <dd>
909 reference to the AST node to be checked 907 reference to the AST node to be checked
910 </dd> 908 </dd>
911 </dl> 909 </dl>
912 <a NAME="SimplifyNodeVisitor.__check222" ID="SimplifyNodeVisitor.__check222"></a> 910 <a NAME="SimplifyNodeVisitor.__check222" ID="SimplifyNodeVisitor.__check222"></a>
913 <h4>SimplifyNodeVisitor.__check222</h4> 911 <h4>SimplifyNodeVisitor.__check222</h4>
914 <b>__check222</b>(<i>node</i>) 912 <b>__check222</b>(<i>node</i>)
915
916 <p> 913 <p>
917 Private method to check for calls of the type "a or not a". 914 Private method to check for calls of the type "a or not a".
918 </p> 915 </p>
916
919 <dl> 917 <dl>
920 918
921 <dt><i>node</i> (ast.BoolOp)</dt> 919 <dt><i>node</i> (ast.BoolOp)</dt>
922 <dd> 920 <dd>
923 reference to the AST node to be checked 921 reference to the AST node to be checked
924 </dd> 922 </dd>
925 </dl> 923 </dl>
926 <a NAME="SimplifyNodeVisitor.__check223" ID="SimplifyNodeVisitor.__check223"></a> 924 <a NAME="SimplifyNodeVisitor.__check223" ID="SimplifyNodeVisitor.__check223"></a>
927 <h4>SimplifyNodeVisitor.__check223</h4> 925 <h4>SimplifyNodeVisitor.__check223</h4>
928 <b>__check223</b>(<i>node</i>) 926 <b>__check223</b>(<i>node</i>)
929
930 <p> 927 <p>
931 Private method to check for calls of the type "... or True". 928 Private method to check for calls of the type "... or True".
932 </p> 929 </p>
930
933 <dl> 931 <dl>
934 932
935 <dt><i>node</i> (ast.BoolOp)</dt> 933 <dt><i>node</i> (ast.BoolOp)</dt>
936 <dd> 934 <dd>
937 reference to the AST node to be checked 935 reference to the AST node to be checked
938 </dd> 936 </dd>
939 </dl> 937 </dl>
940 <a NAME="SimplifyNodeVisitor.__check224" ID="SimplifyNodeVisitor.__check224"></a> 938 <a NAME="SimplifyNodeVisitor.__check224" ID="SimplifyNodeVisitor.__check224"></a>
941 <h4>SimplifyNodeVisitor.__check224</h4> 939 <h4>SimplifyNodeVisitor.__check224</h4>
942 <b>__check224</b>(<i>node</i>) 940 <b>__check224</b>(<i>node</i>)
943
944 <p> 941 <p>
945 Private method to check for calls of the type "... and False". 942 Private method to check for calls of the type "... and False".
946 </p> 943 </p>
944
947 <dl> 945 <dl>
948 946
949 <dt><i>node</i> (ast.BoolOp)</dt> 947 <dt><i>node</i> (ast.BoolOp)</dt>
950 <dd> 948 <dd>
951 reference to the AST node to be checked 949 reference to the AST node to be checked
952 </dd> 950 </dd>
953 </dl> 951 </dl>
954 <a NAME="SimplifyNodeVisitor.__check301" ID="SimplifyNodeVisitor.__check301"></a> 952 <a NAME="SimplifyNodeVisitor.__check301" ID="SimplifyNodeVisitor.__check301"></a>
955 <h4>SimplifyNodeVisitor.__check301</h4> 953 <h4>SimplifyNodeVisitor.__check301</h4>
956 <b>__check301</b>(<i>node</i>) 954 <b>__check301</b>(<i>node</i>)
957
958 <p> 955 <p>
959 Private method to check for Yoda conditions. 956 Private method to check for Yoda conditions.
960 </p> 957 </p>
958
961 <dl> 959 <dl>
962 960
963 <dt><i>node</i> (ast.Compare)</dt> 961 <dt><i>node</i> (ast.Compare)</dt>
964 <dd> 962 <dd>
965 reference to the AST node to be checked 963 reference to the AST node to be checked
966 </dd> 964 </dd>
967 </dl> 965 </dl>
968 <a NAME="SimplifyNodeVisitor.__check401" ID="SimplifyNodeVisitor.__check401"></a> 966 <a NAME="SimplifyNodeVisitor.__check401" ID="SimplifyNodeVisitor.__check401"></a>
969 <h4>SimplifyNodeVisitor.__check401</h4> 967 <h4>SimplifyNodeVisitor.__check401</h4>
970 <b>__check401</b>(<i>node</i>) 968 <b>__check401</b>(<i>node</i>)
971
972 <p> 969 <p>
973 Private method to check for bare boolean function arguments. 970 Private method to check for bare boolean function arguments.
974 </p> 971 </p>
972
975 <dl> 973 <dl>
976 974
977 <dt><i>node</i> (ast.Call)</dt> 975 <dt><i>node</i> (ast.Call)</dt>
978 <dd> 976 <dd>
979 reference to the AST node to be checked 977 reference to the AST node to be checked
980 </dd> 978 </dd>
981 </dl> 979 </dl>
982 <a NAME="SimplifyNodeVisitor.__check402" ID="SimplifyNodeVisitor.__check402"></a> 980 <a NAME="SimplifyNodeVisitor.__check402" ID="SimplifyNodeVisitor.__check402"></a>
983 <h4>SimplifyNodeVisitor.__check402</h4> 981 <h4>SimplifyNodeVisitor.__check402</h4>
984 <b>__check402</b>(<i>node</i>) 982 <b>__check402</b>(<i>node</i>)
985
986 <p> 983 <p>
987 Private method to check for bare numeric function arguments. 984 Private method to check for bare numeric function arguments.
988 </p> 985 </p>
986
989 <dl> 987 <dl>
990 988
991 <dt><i>node</i> (ast.Call)</dt> 989 <dt><i>node</i> (ast.Call)</dt>
992 <dd> 990 <dd>
993 reference to the AST node to be checked 991 reference to the AST node to be checked
994 </dd> 992 </dd>
995 </dl> 993 </dl>
996 <a NAME="SimplifyNodeVisitor.__check901" ID="SimplifyNodeVisitor.__check901"></a> 994 <a NAME="SimplifyNodeVisitor.__check901" ID="SimplifyNodeVisitor.__check901"></a>
997 <h4>SimplifyNodeVisitor.__check901</h4> 995 <h4>SimplifyNodeVisitor.__check901</h4>
998 <b>__check901</b>(<i>node</i>) 996 <b>__check901</b>(<i>node</i>)
999
1000 <p> 997 <p>
1001 Private method to check for unnecessary bool conversion. 998 Private method to check for unnecessary bool conversion.
1002 </p> 999 </p>
1000
1003 <dl> 1001 <dl>
1004 1002
1005 <dt><i>node</i> (ast.Call)</dt> 1003 <dt><i>node</i> (ast.Call)</dt>
1006 <dd> 1004 <dd>
1007 reference to the AST node to be checked 1005 reference to the AST node to be checked
1008 </dd> 1006 </dd>
1009 </dl> 1007 </dl>
1010 <a NAME="SimplifyNodeVisitor.__check904" ID="SimplifyNodeVisitor.__check904"></a> 1008 <a NAME="SimplifyNodeVisitor.__check904" ID="SimplifyNodeVisitor.__check904"></a>
1011 <h4>SimplifyNodeVisitor.__check904</h4> 1009 <h4>SimplifyNodeVisitor.__check904</h4>
1012 <b>__check904</b>(<i>node</i>) 1010 <b>__check904</b>(<i>node</i>)
1013
1014 <p> 1011 <p>
1015 Private method to check for dictionary initialization. 1012 Private method to check for dictionary initialization.
1016 </p> 1013 </p>
1014
1017 <dl> 1015 <dl>
1018 1016
1019 <dt><i>node</i> (ast.Assign)</dt> 1017 <dt><i>node</i> (ast.Assign)</dt>
1020 <dd> 1018 <dd>
1021 reference to the AST node to be checked 1019 reference to the AST node to be checked
1022 </dd> 1020 </dd>
1023 </dl> 1021 </dl>
1024 <a NAME="SimplifyNodeVisitor.__check905" ID="SimplifyNodeVisitor.__check905"></a> 1022 <a NAME="SimplifyNodeVisitor.__check905" ID="SimplifyNodeVisitor.__check905"></a>
1025 <h4>SimplifyNodeVisitor.__check905</h4> 1023 <h4>SimplifyNodeVisitor.__check905</h4>
1026 <b>__check905</b>(<i>node</i>) 1024 <b>__check905</b>(<i>node</i>)
1027
1028 <p> 1025 <p>
1029 Private method to check for list initialization by splitting a string. 1026 Private method to check for list initialization by splitting a string.
1030 </p> 1027 </p>
1028
1031 <dl> 1029 <dl>
1032 1030
1033 <dt><i>node</i> (ast.Call)</dt> 1031 <dt><i>node</i> (ast.Call)</dt>
1034 <dd> 1032 <dd>
1035 reference to the AST node to be checked 1033 reference to the AST node to be checked
1036 </dd> 1034 </dd>
1037 </dl> 1035 </dl>
1038 <a NAME="SimplifyNodeVisitor.__check906" ID="SimplifyNodeVisitor.__check906"></a> 1036 <a NAME="SimplifyNodeVisitor.__check906" ID="SimplifyNodeVisitor.__check906"></a>
1039 <h4>SimplifyNodeVisitor.__check906</h4> 1037 <h4>SimplifyNodeVisitor.__check906</h4>
1040 <b>__check906</b>(<i>node</i>) 1038 <b>__check906</b>(<i>node</i>)
1041
1042 <p> 1039 <p>
1043 Private method to check for unnecessary nesting of os.path.join(). 1040 Private method to check for unnecessary nesting of os.path.join().
1044 </p> 1041 </p>
1042
1045 <dl> 1043 <dl>
1046 1044
1047 <dt><i>node</i> (ast.Call)</dt> 1045 <dt><i>node</i> (ast.Call)</dt>
1048 <dd> 1046 <dd>
1049 reference to the AST node to be checked 1047 reference to the AST node to be checked
1050 </dd> 1048 </dd>
1051 </dl> 1049 </dl>
1052 <a NAME="SimplifyNodeVisitor.__check907" ID="SimplifyNodeVisitor.__check907"></a> 1050 <a NAME="SimplifyNodeVisitor.__check907" ID="SimplifyNodeVisitor.__check907"></a>
1053 <h4>SimplifyNodeVisitor.__check907</h4> 1051 <h4>SimplifyNodeVisitor.__check907</h4>
1054 <b>__check907</b>(<i>node</i>) 1052 <b>__check907</b>(<i>node</i>)
1055
1056 <p> 1053 <p>
1057 Private method to check for Union type annotation with None. 1054 Private method to check for Union type annotation with None.
1058 </p> 1055 </p>
1056
1059 <dl> 1057 <dl>
1060 1058
1061 <dt><i>node</i> (ast.Subscript)</dt> 1059 <dt><i>node</i> (ast.Subscript)</dt>
1062 <dd> 1060 <dd>
1063 reference to the AST node to be checked 1061 reference to the AST node to be checked
1064 </dd> 1062 </dd>
1065 </dl> 1063 </dl>
1066 <a NAME="SimplifyNodeVisitor.__check909" ID="SimplifyNodeVisitor.__check909"></a> 1064 <a NAME="SimplifyNodeVisitor.__check909" ID="SimplifyNodeVisitor.__check909"></a>
1067 <h4>SimplifyNodeVisitor.__check909</h4> 1065 <h4>SimplifyNodeVisitor.__check909</h4>
1068 <b>__check909</b>(<i>node</i>) 1066 <b>__check909</b>(<i>node</i>)
1069
1070 <p> 1067 <p>
1071 Private method to check for reflexive assignments. 1068 Private method to check for reflexive assignments.
1072 </p> 1069 </p>
1070
1073 <dl> 1071 <dl>
1074 1072
1075 <dt><i>node</i> (ast.Assign)</dt> 1073 <dt><i>node</i> (ast.Assign)</dt>
1076 <dd> 1074 <dd>
1077 reference to the AST node to be checked 1075 reference to the AST node to be checked
1078 </dd> 1076 </dd>
1079 </dl> 1077 </dl>
1080 <a NAME="SimplifyNodeVisitor.__check910" ID="SimplifyNodeVisitor.__check910"></a> 1078 <a NAME="SimplifyNodeVisitor.__check910" ID="SimplifyNodeVisitor.__check910"></a>
1081 <h4>SimplifyNodeVisitor.__check910</h4> 1079 <h4>SimplifyNodeVisitor.__check910</h4>
1082 <b>__check910</b>(<i>node</i>) 1080 <b>__check910</b>(<i>node</i>)
1083
1084 <p> 1081 <p>
1085 Private method to check for uses of 'dict.get(key, None)'. 1082 Private method to check for uses of 'dict.get(key, None)'.
1086 </p> 1083 </p>
1084
1087 <dl> 1085 <dl>
1088 1086
1089 <dt><i>node</i> (ast.Call)</dt> 1087 <dt><i>node</i> (ast.Call)</dt>
1090 <dd> 1088 <dd>
1091 reference to the AST node to be checked 1089 reference to the AST node to be checked
1092 </dd> 1090 </dd>
1093 </dl> 1091 </dl>
1094 <a NAME="SimplifyNodeVisitor.__check911" ID="SimplifyNodeVisitor.__check911"></a> 1092 <a NAME="SimplifyNodeVisitor.__check911" ID="SimplifyNodeVisitor.__check911"></a>
1095 <h4>SimplifyNodeVisitor.__check911</h4> 1093 <h4>SimplifyNodeVisitor.__check911</h4>
1096 <b>__check911</b>(<i>node</i>) 1094 <b>__check911</b>(<i>node</i>)
1097
1098 <p> 1095 <p>
1099 Private method to check for the expression "zip(_.keys(), _.values())". 1096 Private method to check for the expression "zip(_.keys(), _.values())".
1100 </p> 1097 </p>
1098
1101 <dl> 1099 <dl>
1102 1100
1103 <dt><i>node</i> (ast.Call)</dt> 1101 <dt><i>node</i> (ast.Call)</dt>
1104 <dd> 1102 <dd>
1105 reference to the AST node to be checked 1103 reference to the AST node to be checked
1106 </dd> 1104 </dd>
1107 </dl> 1105 </dl>
1108 <a NAME="SimplifyNodeVisitor.__expressionUsesVariable" ID="SimplifyNodeVisitor.__expressionUsesVariable"></a> 1106 <a NAME="SimplifyNodeVisitor.__expressionUsesVariable" ID="SimplifyNodeVisitor.__expressionUsesVariable"></a>
1109 <h4>SimplifyNodeVisitor.__expressionUsesVariable</h4> 1107 <h4>SimplifyNodeVisitor.__expressionUsesVariable</h4>
1110 <b>__expressionUsesVariable</b>(<i>expr, var</i>) 1108 <b>__expressionUsesVariable</b>(<i>expr, var</i>)
1111
1112 <p> 1109 <p>
1113 Private method to check, if a variable is used by an expression. 1110 Private method to check, if a variable is used by an expression.
1114 </p> 1111 </p>
1112
1115 <dl> 1113 <dl>
1116 1114
1117 <dt><i>expr</i> (ast.expr)</dt> 1115 <dt><i>expr</i> (ast.expr)</dt>
1118 <dd> 1116 <dd>
1119 expression node to be checked 1117 expression node to be checked
1136 </dd> 1134 </dd>
1137 </dl> 1135 </dl>
1138 <a NAME="SimplifyNodeVisitor.__getDuplicatedIsinstanceCall" ID="SimplifyNodeVisitor.__getDuplicatedIsinstanceCall"></a> 1136 <a NAME="SimplifyNodeVisitor.__getDuplicatedIsinstanceCall" ID="SimplifyNodeVisitor.__getDuplicatedIsinstanceCall"></a>
1139 <h4>SimplifyNodeVisitor.__getDuplicatedIsinstanceCall</h4> 1137 <h4>SimplifyNodeVisitor.__getDuplicatedIsinstanceCall</h4>
1140 <b>__getDuplicatedIsinstanceCall</b>(<i>node</i>) 1138 <b>__getDuplicatedIsinstanceCall</b>(<i>node</i>)
1141
1142 <p> 1139 <p>
1143 Private method to get a list of isinstance arguments which could 1140 Private method to get a list of isinstance arguments which could
1144 be combined. 1141 be combined.
1145 </p> 1142 </p>
1143
1146 <dl> 1144 <dl>
1147 1145
1148 <dt><i>node</i> (ast.BoolOp)</dt> 1146 <dt><i>node</i> (ast.BoolOp)</dt>
1149 <dd> 1147 <dd>
1150 reference to the AST node to be inspected 1148 reference to the AST node to be inspected
1163 </dd> 1161 </dd>
1164 </dl> 1162 </dl>
1165 <a NAME="SimplifyNodeVisitor.__getIfBodyPairs" ID="SimplifyNodeVisitor.__getIfBodyPairs"></a> 1163 <a NAME="SimplifyNodeVisitor.__getIfBodyPairs" ID="SimplifyNodeVisitor.__getIfBodyPairs"></a>
1166 <h4>SimplifyNodeVisitor.__getIfBodyPairs</h4> 1164 <h4>SimplifyNodeVisitor.__getIfBodyPairs</h4>
1167 <b>__getIfBodyPairs</b>(<i>node</i>) 1165 <b>__getIfBodyPairs</b>(<i>node</i>)
1168
1169 <p> 1166 <p>
1170 Private method to extract a list of pairs of test and body for an 1167 Private method to extract a list of pairs of test and body for an
1171 If node. 1168 If node.
1172 </p> 1169 </p>
1170
1173 <dl> 1171 <dl>
1174 1172
1175 <dt><i>node</i> (ast.If)</dt> 1173 <dt><i>node</i> (ast.If)</dt>
1176 <dd> 1174 <dd>
1177 reference to the If node to be processed 1175 reference to the If node to be processed
1190 </dd> 1188 </dd>
1191 </dl> 1189 </dl>
1192 <a NAME="SimplifyNodeVisitor.__isConstantIncrease" ID="SimplifyNodeVisitor.__isConstantIncrease"></a> 1190 <a NAME="SimplifyNodeVisitor.__isConstantIncrease" ID="SimplifyNodeVisitor.__isConstantIncrease"></a>
1193 <h4>SimplifyNodeVisitor.__isConstantIncrease</h4> 1191 <h4>SimplifyNodeVisitor.__isConstantIncrease</h4>
1194 <b>__isConstantIncrease</b>(<i>expr</i>) 1192 <b>__isConstantIncrease</b>(<i>expr</i>)
1195
1196 <p> 1193 <p>
1197 Private method to check an expression for being a constant increase. 1194 Private method to check an expression for being a constant increase.
1198 </p> 1195 </p>
1196
1199 <dl> 1197 <dl>
1200 1198
1201 <dt><i>expr</i> (ast.AugAssign)</dt> 1199 <dt><i>expr</i> (ast.AugAssign)</dt>
1202 <dd> 1200 <dd>
1203 reference to the node to be checked 1201 reference to the node to be checked
1216 </dd> 1214 </dd>
1217 </dl> 1215 </dl>
1218 <a NAME="SimplifyNodeVisitor.__isExceptionCheck" ID="SimplifyNodeVisitor.__isExceptionCheck"></a> 1216 <a NAME="SimplifyNodeVisitor.__isExceptionCheck" ID="SimplifyNodeVisitor.__isExceptionCheck"></a>
1219 <h4>SimplifyNodeVisitor.__isExceptionCheck</h4> 1217 <h4>SimplifyNodeVisitor.__isExceptionCheck</h4>
1220 <b>__isExceptionCheck</b>(<i>node</i>) 1218 <b>__isExceptionCheck</b>(<i>node</i>)
1221
1222 <p> 1219 <p>
1223 Private method to check, if the node is checking an exception. 1220 Private method to check, if the node is checking an exception.
1224 </p> 1221 </p>
1222
1225 <dl> 1223 <dl>
1226 1224
1227 <dt><i>node</i> (ast.If)</dt> 1225 <dt><i>node</i> (ast.If)</dt>
1228 <dd> 1226 <dd>
1229 reference to the node to be checked 1227 reference to the node to be checked
1242 </dd> 1240 </dd>
1243 </dl> 1241 </dl>
1244 <a NAME="SimplifyNodeVisitor.__isSameBody" ID="SimplifyNodeVisitor.__isSameBody"></a> 1242 <a NAME="SimplifyNodeVisitor.__isSameBody" ID="SimplifyNodeVisitor.__isSameBody"></a>
1245 <h4>SimplifyNodeVisitor.__isSameBody</h4> 1243 <h4>SimplifyNodeVisitor.__isSameBody</h4>
1246 <b>__isSameBody</b>(<i>body1, body2</i>) 1244 <b>__isSameBody</b>(<i>body1, body2</i>)
1247
1248 <p> 1245 <p>
1249 Private method check, if the given bodies are equivalent. 1246 Private method check, if the given bodies are equivalent.
1250 </p> 1247 </p>
1248
1251 <dl> 1249 <dl>
1252 1250
1253 <dt><i>body1</i> (list of ast.stmt)</dt> 1251 <dt><i>body1</i> (list of ast.stmt)</dt>
1254 <dd> 1252 <dd>
1255 list of statements of the first body 1253 list of statements of the first body
1272 </dd> 1270 </dd>
1273 </dl> 1271 </dl>
1274 <a NAME="SimplifyNodeVisitor.__isSameExpression" ID="SimplifyNodeVisitor.__isSameExpression"></a> 1272 <a NAME="SimplifyNodeVisitor.__isSameExpression" ID="SimplifyNodeVisitor.__isSameExpression"></a>
1275 <h4>SimplifyNodeVisitor.__isSameExpression</h4> 1273 <h4>SimplifyNodeVisitor.__isSameExpression</h4>
1276 <b>__isSameExpression</b>(<i>a, b</i>) 1274 <b>__isSameExpression</b>(<i>a, b</i>)
1277
1278 <p> 1275 <p>
1279 Private method to check, if two expressions are equal. 1276 Private method to check, if two expressions are equal.
1280 </p> 1277 </p>
1278
1281 <dl> 1279 <dl>
1282 1280
1283 <dt><i>a</i> (ast.expr)</dt> 1281 <dt><i>a</i> (ast.expr)</dt>
1284 <dd> 1282 <dd>
1285 first expression to be checked 1283 first expression to be checked
1302 </dd> 1300 </dd>
1303 </dl> 1301 </dl>
1304 <a NAME="SimplifyNodeVisitor.__isStatementEqual" ID="SimplifyNodeVisitor.__isStatementEqual"></a> 1302 <a NAME="SimplifyNodeVisitor.__isStatementEqual" ID="SimplifyNodeVisitor.__isStatementEqual"></a>
1305 <h4>SimplifyNodeVisitor.__isStatementEqual</h4> 1303 <h4>SimplifyNodeVisitor.__isStatementEqual</h4>
1306 <b>__isStatementEqual</b>(<i>a, b</i>) 1304 <b>__isStatementEqual</b>(<i>a, b</i>)
1307
1308 <p> 1305 <p>
1309 Private method to check, if two statements are equal. 1306 Private method to check, if two statements are equal.
1310 </p> 1307 </p>
1308
1311 <dl> 1309 <dl>
1312 1310
1313 <dt><i>a</i> (ast.stmt)</dt> 1311 <dt><i>a</i> (ast.stmt)</dt>
1314 <dd> 1312 <dd>
1315 reference to the first statement 1313 reference to the first statement
1332 </dd> 1330 </dd>
1333 </dl> 1331 </dl>
1334 <a NAME="SimplifyNodeVisitor.__negateTest" ID="SimplifyNodeVisitor.__negateTest"></a> 1332 <a NAME="SimplifyNodeVisitor.__negateTest" ID="SimplifyNodeVisitor.__negateTest"></a>
1335 <h4>SimplifyNodeVisitor.__negateTest</h4> 1333 <h4>SimplifyNodeVisitor.__negateTest</h4>
1336 <b>__negateTest</b>(<i>node</i>) 1334 <b>__negateTest</b>(<i>node</i>)
1337
1338 <p> 1335 <p>
1339 Private method negate the given Compare node. 1336 Private method negate the given Compare node.
1340 </p> 1337 </p>
1338
1341 <dl> 1339 <dl>
1342 1340
1343 <dt><i>node</i> (ast.Compare)</dt> 1341 <dt><i>node</i> (ast.Compare)</dt>
1344 <dd> 1342 <dd>
1345 reference to the node to be negated 1343 reference to the node to be negated
1362 <b>getOsPathJoinArgs</b>(<i></i>) 1360 <b>getOsPathJoinArgs</b>(<i></i>)
1363 1361
1364 <a NAME="SimplifyNodeVisitor.visit_Assign" ID="SimplifyNodeVisitor.visit_Assign"></a> 1362 <a NAME="SimplifyNodeVisitor.visit_Assign" ID="SimplifyNodeVisitor.visit_Assign"></a>
1365 <h4>SimplifyNodeVisitor.visit_Assign</h4> 1363 <h4>SimplifyNodeVisitor.visit_Assign</h4>
1366 <b>visit_Assign</b>(<i>node</i>) 1364 <b>visit_Assign</b>(<i>node</i>)
1367
1368 <p> 1365 <p>
1369 Public method to process an Assign node. 1366 Public method to process an Assign node.
1370 </p> 1367 </p>
1368
1371 <dl> 1369 <dl>
1372 1370
1373 <dt><i>node</i> (ast.Assign)</dt> 1371 <dt><i>node</i> (ast.Assign)</dt>
1374 <dd> 1372 <dd>
1375 reference to the Assign node 1373 reference to the Assign node
1376 </dd> 1374 </dd>
1377 </dl> 1375 </dl>
1378 <a NAME="SimplifyNodeVisitor.visit_BoolOp" ID="SimplifyNodeVisitor.visit_BoolOp"></a> 1376 <a NAME="SimplifyNodeVisitor.visit_BoolOp" ID="SimplifyNodeVisitor.visit_BoolOp"></a>
1379 <h4>SimplifyNodeVisitor.visit_BoolOp</h4> 1377 <h4>SimplifyNodeVisitor.visit_BoolOp</h4>
1380 <b>visit_BoolOp</b>(<i>node</i>) 1378 <b>visit_BoolOp</b>(<i>node</i>)
1381
1382 <p> 1379 <p>
1383 Public method to process a BoolOp node. 1380 Public method to process a BoolOp node.
1384 </p> 1381 </p>
1382
1385 <dl> 1383 <dl>
1386 1384
1387 <dt><i>node</i> (ast.BoolOp)</dt> 1385 <dt><i>node</i> (ast.BoolOp)</dt>
1388 <dd> 1386 <dd>
1389 reference to the BoolOp node 1387 reference to the BoolOp node
1390 </dd> 1388 </dd>
1391 </dl> 1389 </dl>
1392 <a NAME="SimplifyNodeVisitor.visit_Call" ID="SimplifyNodeVisitor.visit_Call"></a> 1390 <a NAME="SimplifyNodeVisitor.visit_Call" ID="SimplifyNodeVisitor.visit_Call"></a>
1393 <h4>SimplifyNodeVisitor.visit_Call</h4> 1391 <h4>SimplifyNodeVisitor.visit_Call</h4>
1394 <b>visit_Call</b>(<i>node</i>) 1392 <b>visit_Call</b>(<i>node</i>)
1395
1396 <p> 1393 <p>
1397 Public method to process a Call node. 1394 Public method to process a Call node.
1398 </p> 1395 </p>
1396
1399 <dl> 1397 <dl>
1400 1398
1401 <dt><i>node</i> (ast.Call)</dt> 1399 <dt><i>node</i> (ast.Call)</dt>
1402 <dd> 1400 <dd>
1403 reference to the Call node 1401 reference to the Call node
1404 </dd> 1402 </dd>
1405 </dl> 1403 </dl>
1406 <a NAME="SimplifyNodeVisitor.visit_ClassDef" ID="SimplifyNodeVisitor.visit_ClassDef"></a> 1404 <a NAME="SimplifyNodeVisitor.visit_ClassDef" ID="SimplifyNodeVisitor.visit_ClassDef"></a>
1407 <h4>SimplifyNodeVisitor.visit_ClassDef</h4> 1405 <h4>SimplifyNodeVisitor.visit_ClassDef</h4>
1408 <b>visit_ClassDef</b>(<i>node</i>) 1406 <b>visit_ClassDef</b>(<i>node</i>)
1409
1410 <p> 1407 <p>
1411 Public method to process a ClassDef node. 1408 Public method to process a ClassDef node.
1412 </p> 1409 </p>
1410
1413 <dl> 1411 <dl>
1414 1412
1415 <dt><i>node</i> (ast.ClassDef)</dt> 1413 <dt><i>node</i> (ast.ClassDef)</dt>
1416 <dd> 1414 <dd>
1417 reference to the ClassDef node 1415 reference to the ClassDef node
1418 </dd> 1416 </dd>
1419 </dl> 1417 </dl>
1420 <a NAME="SimplifyNodeVisitor.visit_Compare" ID="SimplifyNodeVisitor.visit_Compare"></a> 1418 <a NAME="SimplifyNodeVisitor.visit_Compare" ID="SimplifyNodeVisitor.visit_Compare"></a>
1421 <h4>SimplifyNodeVisitor.visit_Compare</h4> 1419 <h4>SimplifyNodeVisitor.visit_Compare</h4>
1422 <b>visit_Compare</b>(<i>node</i>) 1420 <b>visit_Compare</b>(<i>node</i>)
1423
1424 <p> 1421 <p>
1425 Public method to process a Compare node. 1422 Public method to process a Compare node.
1426 </p> 1423 </p>
1424
1427 <dl> 1425 <dl>
1428 1426
1429 <dt><i>node</i> (ast.Compare)</dt> 1427 <dt><i>node</i> (ast.Compare)</dt>
1430 <dd> 1428 <dd>
1431 reference to the Compare node 1429 reference to the Compare node
1432 </dd> 1430 </dd>
1433 </dl> 1431 </dl>
1434 <a NAME="SimplifyNodeVisitor.visit_Expr" ID="SimplifyNodeVisitor.visit_Expr"></a> 1432 <a NAME="SimplifyNodeVisitor.visit_Expr" ID="SimplifyNodeVisitor.visit_Expr"></a>
1435 <h4>SimplifyNodeVisitor.visit_Expr</h4> 1433 <h4>SimplifyNodeVisitor.visit_Expr</h4>
1436 <b>visit_Expr</b>(<i>node</i>) 1434 <b>visit_Expr</b>(<i>node</i>)
1437
1438 <p> 1435 <p>
1439 Public method to process an Expr node. 1436 Public method to process an Expr node.
1440 </p> 1437 </p>
1438
1441 <dl> 1439 <dl>
1442 1440
1443 <dt><i>node</i> (ast.Expr)</dt> 1441 <dt><i>node</i> (ast.Expr)</dt>
1444 <dd> 1442 <dd>
1445 reference to the Expr node 1443 reference to the Expr node
1446 </dd> 1444 </dd>
1447 </dl> 1445 </dl>
1448 <a NAME="SimplifyNodeVisitor.visit_For" ID="SimplifyNodeVisitor.visit_For"></a> 1446 <a NAME="SimplifyNodeVisitor.visit_For" ID="SimplifyNodeVisitor.visit_For"></a>
1449 <h4>SimplifyNodeVisitor.visit_For</h4> 1447 <h4>SimplifyNodeVisitor.visit_For</h4>
1450 <b>visit_For</b>(<i>node</i>) 1448 <b>visit_For</b>(<i>node</i>)
1451
1452 <p> 1449 <p>
1453 Public method to process a For node. 1450 Public method to process a For node.
1454 </p> 1451 </p>
1452
1455 <dl> 1453 <dl>
1456 1454
1457 <dt><i>node</i> (ast.For)</dt> 1455 <dt><i>node</i> (ast.For)</dt>
1458 <dd> 1456 <dd>
1459 reference to the For node 1457 reference to the For node
1460 </dd> 1458 </dd>
1461 </dl> 1459 </dl>
1462 <a NAME="SimplifyNodeVisitor.visit_If" ID="SimplifyNodeVisitor.visit_If"></a> 1460 <a NAME="SimplifyNodeVisitor.visit_If" ID="SimplifyNodeVisitor.visit_If"></a>
1463 <h4>SimplifyNodeVisitor.visit_If</h4> 1461 <h4>SimplifyNodeVisitor.visit_If</h4>
1464 <b>visit_If</b>(<i>node</i>) 1462 <b>visit_If</b>(<i>node</i>)
1465
1466 <p> 1463 <p>
1467 Public method to process an If node. 1464 Public method to process an If node.
1468 </p> 1465 </p>
1466
1469 <dl> 1467 <dl>
1470 1468
1471 <dt><i>node</i> (ast.If)</dt> 1469 <dt><i>node</i> (ast.If)</dt>
1472 <dd> 1470 <dd>
1473 reference to the If node 1471 reference to the If node
1474 </dd> 1472 </dd>
1475 </dl> 1473 </dl>
1476 <a NAME="SimplifyNodeVisitor.visit_IfExp" ID="SimplifyNodeVisitor.visit_IfExp"></a> 1474 <a NAME="SimplifyNodeVisitor.visit_IfExp" ID="SimplifyNodeVisitor.visit_IfExp"></a>
1477 <h4>SimplifyNodeVisitor.visit_IfExp</h4> 1475 <h4>SimplifyNodeVisitor.visit_IfExp</h4>
1478 <b>visit_IfExp</b>(<i>node</i>) 1476 <b>visit_IfExp</b>(<i>node</i>)
1479
1480 <p> 1477 <p>
1481 Public method to process an IfExp node. 1478 Public method to process an IfExp node.
1482 </p> 1479 </p>
1480
1483 <dl> 1481 <dl>
1484 1482
1485 <dt><i>node</i> (ast.IfExp)</dt> 1483 <dt><i>node</i> (ast.IfExp)</dt>
1486 <dd> 1484 <dd>
1487 reference to the IfExp node 1485 reference to the IfExp node
1488 </dd> 1486 </dd>
1489 </dl> 1487 </dl>
1490 <a NAME="SimplifyNodeVisitor.visit_Subscript" ID="SimplifyNodeVisitor.visit_Subscript"></a> 1488 <a NAME="SimplifyNodeVisitor.visit_Subscript" ID="SimplifyNodeVisitor.visit_Subscript"></a>
1491 <h4>SimplifyNodeVisitor.visit_Subscript</h4> 1489 <h4>SimplifyNodeVisitor.visit_Subscript</h4>
1492 <b>visit_Subscript</b>(<i>node</i>) 1490 <b>visit_Subscript</b>(<i>node</i>)
1493
1494 <p> 1491 <p>
1495 Public method to process a Subscript node. 1492 Public method to process a Subscript node.
1496 </p> 1493 </p>
1494
1497 <dl> 1495 <dl>
1498 1496
1499 <dt><i>node</i> (ast.Subscript)</dt> 1497 <dt><i>node</i> (ast.Subscript)</dt>
1500 <dd> 1498 <dd>
1501 reference to the Subscript node 1499 reference to the Subscript node
1502 </dd> 1500 </dd>
1503 </dl> 1501 </dl>
1504 <a NAME="SimplifyNodeVisitor.visit_Try" ID="SimplifyNodeVisitor.visit_Try"></a> 1502 <a NAME="SimplifyNodeVisitor.visit_Try" ID="SimplifyNodeVisitor.visit_Try"></a>
1505 <h4>SimplifyNodeVisitor.visit_Try</h4> 1503 <h4>SimplifyNodeVisitor.visit_Try</h4>
1506 <b>visit_Try</b>(<i>node</i>) 1504 <b>visit_Try</b>(<i>node</i>)
1507
1508 <p> 1505 <p>
1509 Public method to process a Try node. 1506 Public method to process a Try node.
1510 </p> 1507 </p>
1508
1511 <dl> 1509 <dl>
1512 1510
1513 <dt><i>node</i> (ast.Try)</dt> 1511 <dt><i>node</i> (ast.Try)</dt>
1514 <dd> 1512 <dd>
1515 reference to the Try node 1513 reference to the Try node
1516 </dd> 1514 </dd>
1517 </dl> 1515 </dl>
1518 <a NAME="SimplifyNodeVisitor.visit_UnaryOp" ID="SimplifyNodeVisitor.visit_UnaryOp"></a> 1516 <a NAME="SimplifyNodeVisitor.visit_UnaryOp" ID="SimplifyNodeVisitor.visit_UnaryOp"></a>
1519 <h4>SimplifyNodeVisitor.visit_UnaryOp</h4> 1517 <h4>SimplifyNodeVisitor.visit_UnaryOp</h4>
1520 <b>visit_UnaryOp</b>(<i>node</i>) 1518 <b>visit_UnaryOp</b>(<i>node</i>)
1521
1522 <p> 1519 <p>
1523 Public method to process a UnaryOp node. 1520 Public method to process a UnaryOp node.
1524 </p> 1521 </p>
1522
1525 <dl> 1523 <dl>
1526 1524
1527 <dt><i>node</i> (ast.UnaryOp)</dt> 1525 <dt><i>node</i> (ast.UnaryOp)</dt>
1528 <dd> 1526 <dd>
1529 reference to the UnaryOp node 1527 reference to the UnaryOp node
1530 </dd> 1528 </dd>
1531 </dl> 1529 </dl>
1532 <a NAME="SimplifyNodeVisitor.visit_With" ID="SimplifyNodeVisitor.visit_With"></a> 1530 <a NAME="SimplifyNodeVisitor.visit_With" ID="SimplifyNodeVisitor.visit_With"></a>
1533 <h4>SimplifyNodeVisitor.visit_With</h4> 1531 <h4>SimplifyNodeVisitor.visit_With</h4>
1534 <b>visit_With</b>(<i>node</i>) 1532 <b>visit_With</b>(<i>node</i>)
1535
1536 <p> 1533 <p>
1537 Public method to process a With node. 1534 Public method to process a With node.
1538 </p> 1535 </p>
1536
1539 <dl> 1537 <dl>
1540 1538
1541 <dt><i>node</i> (ast.With)</dt> 1539 <dt><i>node</i> (ast.With)</dt>
1542 <dd> 1540 <dd>
1543 reference to the With node 1541 reference to the With node

eric ide

mercurial