src/eric7/Documentation/Source/eric7.Plugins.CheckerPlugins.CodeStyleChecker.Miscellaneous.MiscellaneousChecker.html

branch
eric7
changeset 10999
c3cf24fe9113
parent 10899
3d32490ebde4
child 11000
f8371a2dd08f
equal deleted inserted replaced
10998:6d7bddfde5fe 10999:c3cf24fe9113
12 </p> 12 </p>
13 13
14 <h3>Global Attributes</h3> 14 <h3>Global Attributes</h3>
15 <table> 15 <table>
16 <tr><td>BugBearContext</td></tr> 16 <tr><td>BugBearContext</td></tr>
17 <tr><td>BugbearImmutableCalls</td></tr>
18 <tr><td>BugbearMutableCalls</td></tr>
19 <tr><td>BugbearMutableComprehensions</td></tr>
20 <tr><td>BugbearMutableLiterals</td></tr>
17 </table> 21 </table>
18 22
19 <h3>Classes</h3> 23 <h3>Classes</h3>
20 <table> 24 <table>
21 <tr> 25 <tr>
29 <tr> 33 <tr>
30 <td><a href="#ExceptBaseExceptionVisitor">ExceptBaseExceptionVisitor</a></td> 34 <td><a href="#ExceptBaseExceptionVisitor">ExceptBaseExceptionVisitor</a></td>
31 <td>Class to determine, if a 'BaseException' is re-raised.</td> 35 <td>Class to determine, if a 'BaseException' is re-raised.</td>
32 </tr> 36 </tr>
33 <tr> 37 <tr>
38 <td><a href="#FunctionDefDefaultsVisitor">FunctionDefDefaultsVisitor</a></td>
39 <td>Class used by M506, M508 and M539.</td>
40 </tr>
41 <tr>
34 <td><a href="#M520NameFinder">M520NameFinder</a></td> 42 <td><a href="#M520NameFinder">M520NameFinder</a></td>
35 <td>Class to extract a name out of a tree of nodes ignoring names defined within the local scope of a comprehension.</td> 43 <td>Class to extract a name out of a tree of nodes ignoring names defined within the local scope of a comprehension.</td>
44 </tr>
45 <tr>
46 <td><a href="#M540CaughtException">M540CaughtException</a></td>
47 <td>Class to hold the data for a caught exception.</td>
36 </tr> 48 </tr>
37 <tr> 49 <tr>
38 <td><a href="#M569Checker">M569Checker</a></td> 50 <td><a href="#M569Checker">M569Checker</a></td>
39 <td>Class traversing a 'for' loop body to check for modifications to a loop's mutable iterable.</td> 51 <td>Class traversing a 'for' loop body to check for modifications to a loop's mutable iterable.</td>
40 </tr> 52 </tr>
107 <tr> 119 <tr>
108 <td><a href="#BugBearVisitor.__checkForM505">__checkForM505</a></td> 120 <td><a href="#BugBearVisitor.__checkForM505">__checkForM505</a></td>
109 <td>Private method to check the use of *strip().</td> 121 <td>Private method to check the use of *strip().</td>
110 </tr> 122 </tr>
111 <tr> 123 <tr>
124 <td><a href="#BugBearVisitor.__checkForM506_M508">__checkForM506_M508</a></td>
125 <td>Private method to check the use of mutable literals, comprehensions and calls.</td>
126 </tr>
127 <tr>
112 <td><a href="#BugBearVisitor.__checkForM507">__checkForM507</a></td> 128 <td><a href="#BugBearVisitor.__checkForM507">__checkForM507</a></td>
113 <td>Private method to check for unused loop variables.</td> 129 <td>Private method to check for unused loop variables.</td>
114 </tr> 130 </tr>
115 <tr> 131 <tr>
116 <td><a href="#BugBearVisitor.__checkForM512">__checkForM512</a></td> 132 <td><a href="#BugBearVisitor.__checkForM512">__checkForM512</a></td>
117 <td>Private method to check for return/continue/break inside finally blocks.</td> 133 <td>Private method to check for return/continue/break inside finally blocks.</td>
118 </tr> 134 </tr>
119 <tr> 135 <tr>
136 <td><a href="#BugBearVisitor.__checkForM513_M529_M530">__checkForM513_M529_M530</a></td>
137 <td>Private method to check various exception handler situations.</td>
138 </tr>
139 <tr>
120 <td><a href="#BugBearVisitor.__checkForM515">__checkForM515</a></td> 140 <td><a href="#BugBearVisitor.__checkForM515">__checkForM515</a></td>
121 <td>Private method to check for pointless comparisons.</td> 141 <td>Private method to check for pointless comparisons.</td>
122 </tr> 142 </tr>
123 <tr> 143 <tr>
124 <td><a href="#BugBearVisitor.__checkForM516">__checkForM516</a></td> 144 <td><a href="#BugBearVisitor.__checkForM516">__checkForM516</a></td>
151 <tr> 171 <tr>
152 <td><a href="#BugBearVisitor.__checkForM523">__checkForM523</a></td> 172 <td><a href="#BugBearVisitor.__checkForM523">__checkForM523</a></td>
153 <td>Private method to check that functions (including lambdas) do not use loop variables.</td> 173 <td>Private method to check that functions (including lambdas) do not use loop variables.</td>
154 </tr> 174 </tr>
155 <tr> 175 <tr>
156 <td><a href="#BugBearVisitor.__checkForM524AndM527">__checkForM524AndM527</a></td> 176 <td><a href="#BugBearVisitor.__checkForM524_M527">__checkForM524_M527</a></td>
157 <td>Private method to check for inheritance from abstract classes in abc and lack of any methods decorated with abstract*.</td> 177 <td>Private method to check for inheritance from abstract classes in abc and lack of any methods decorated with abstract*.</td>
158 </tr> 178 </tr>
159 <tr> 179 <tr>
160 <td><a href="#BugBearVisitor.__checkForM525">__checkForM525</a></td> 180 <td><a href="#BugBearVisitor.__checkForM525">__checkForM525</a></td>
161 <td>Private method to check for exceptions being handled multiple times.</td> 181 <td>Private method to check for exceptions being handled multiple times.</td>
187 <tr> 207 <tr>
188 <td><a href="#BugBearVisitor.__checkForM535">__checkForM535</a></td> 208 <td><a href="#BugBearVisitor.__checkForM535">__checkForM535</a></td>
189 <td>Private method to check that a static key isn't used in a dict comprehension.</td> 209 <td>Private method to check that a static key isn't used in a dict comprehension.</td>
190 </tr> 210 </tr>
191 <tr> 211 <tr>
212 <td><a href="#BugBearVisitor.__checkForM539">__checkForM539</a></td>
213 <td>Private method to check for correct ContextVar usage.</td>
214 </tr>
215 <tr>
216 <td><a href="#BugBearVisitor.__checkForM540AddNote">__checkForM540AddNote</a></td>
217 <td>Private method to check add_note usage.</td>
218 </tr>
219 <tr>
220 <td><a href="#BugBearVisitor.__checkForM540Usage">__checkForM540Usage</a></td>
221 <td>Private method to check the usage of exceptions with added note.</td>
222 </tr>
223 <tr>
192 <td><a href="#BugBearVisitor.__checkForM569">__checkForM569</a></td> 224 <td><a href="#BugBearVisitor.__checkForM569">__checkForM569</a></td>
193 <td>Private method to check for changes to a loop's mutable iterable.</td> 225 <td>Private method to check for changes to a loop's mutable iterable.</td>
194 </tr> 226 </tr>
195 <tr> 227 <tr>
196 <td><a href="#BugBearVisitor.__checkRedundantExcepthandlers">__checkRedundantExcepthandlers</a></td> 228 <td><a href="#BugBearVisitor.__checkRedundantExcepthandlers">__checkRedundantExcepthandlers</a></td>
199 <tr> 231 <tr>
200 <td><a href="#BugBearVisitor.__childrenInScope">__childrenInScope</a></td> 232 <td><a href="#BugBearVisitor.__childrenInScope">__childrenInScope</a></td>
201 <td>Private method to get all child nodes in the given scope.</td> 233 <td>Private method to get all child nodes in the given scope.</td>
202 </tr> 234 </tr>
203 <tr> 235 <tr>
204 <td><a href="#BugBearVisitor.__composeCallPath">__composeCallPath</a></td>
205 <td>Private method get the individual elements of the call path of a node.</td>
206 </tr>
207 <tr>
208 <td><a href="#BugBearVisitor.__flattenExcepthandler">__flattenExcepthandler</a></td> 236 <td><a href="#BugBearVisitor.__flattenExcepthandler">__flattenExcepthandler</a></td>
209 <td>Private method to flatten the list of exceptions handled by an except handler.</td> 237 <td>Private method to flatten the list of exceptions handled by an except handler.</td>
210 </tr> 238 </tr>
211 <tr> 239 <tr>
212 <td><a href="#BugBearVisitor.__getAssignedNames">__getAssignedNames</a></td> 240 <td><a href="#BugBearVisitor.__getAssignedNames">__getAssignedNames</a></td>
271 <tr> 299 <tr>
272 <td><a href="#BugBearVisitor.nodeStack">nodeStack</a></td> 300 <td><a href="#BugBearVisitor.nodeStack">nodeStack</a></td>
273 <td>Public method to get a reference to the most recent node stack.</td> 301 <td>Public method to get a reference to the most recent node stack.</td>
274 </tr> 302 </tr>
275 <tr> 303 <tr>
304 <td><a href="#BugBearVisitor.superwalk">superwalk</a></td>
305 <td>Function to walk an AST node or a list of AST nodes.</td>
306 </tr>
307 <tr>
276 <td><a href="#BugBearVisitor.toNameStr">toNameStr</a></td> 308 <td><a href="#BugBearVisitor.toNameStr">toNameStr</a></td>
277 <td>Public method to turn Name and Attribute nodes to strings, handling any depth of attribute accesses.</td> 309 <td>Public method to turn Name and Attribute nodes to strings, handling any depth of attribute accesses.</td>
278 </tr> 310 </tr>
279 <tr> 311 <tr>
280 <td><a href="#BugBearVisitor.visit">visit</a></td> 312 <td><a href="#BugBearVisitor.visit">visit</a></td>
293 <td>Public method to handle assignments.</td> 325 <td>Public method to handle assignments.</td>
294 </tr> 326 </tr>
295 <tr> 327 <tr>
296 <td><a href="#BugBearVisitor.visit_AsyncFor">visit_AsyncFor</a></td> 328 <td><a href="#BugBearVisitor.visit_AsyncFor">visit_AsyncFor</a></td>
297 <td>Public method to handle 'for' statements.</td> 329 <td>Public method to handle 'for' statements.</td>
330 </tr>
331 <tr>
332 <td><a href="#BugBearVisitor.visit_AsyncFunctionDef">visit_AsyncFunctionDef</a></td>
333 <td>Public method to handle async function definitions.</td>
298 </tr> 334 </tr>
299 <tr> 335 <tr>
300 <td><a href="#BugBearVisitor.visit_Call">visit_Call</a></td> 336 <td><a href="#BugBearVisitor.visit_Call">visit_Call</a></td>
301 <td>Public method to handle a function call.</td> 337 <td>Public method to handle a function call.</td>
302 </tr> 338 </tr>
415 <dt><i>node</i> (ast.Call)</dt> 451 <dt><i>node</i> (ast.Call)</dt>
416 <dd> 452 <dd>
417 reference to the node to be processed 453 reference to the node to be processed
418 </dd> 454 </dd>
419 </dl> 455 </dl>
456 <a NAME="BugBearVisitor.__checkForM506_M508" ID="BugBearVisitor.__checkForM506_M508"></a>
457 <h4>BugBearVisitor.__checkForM506_M508</h4>
458 <b>__checkForM506_M508</b>(<i>node</i>)
459 <p>
460 Private method to check the use of mutable literals, comprehensions and calls.
461 </p>
462
463 <dl>
464
465 <dt><i>node</i> (ast.AsyncFunctionDef or ast.FunctionDef)</dt>
466 <dd>
467 reference to the node to be processed
468 </dd>
469 </dl>
420 <a NAME="BugBearVisitor.__checkForM507" ID="BugBearVisitor.__checkForM507"></a> 470 <a NAME="BugBearVisitor.__checkForM507" ID="BugBearVisitor.__checkForM507"></a>
421 <h4>BugBearVisitor.__checkForM507</h4> 471 <h4>BugBearVisitor.__checkForM507</h4>
422 <b>__checkForM507</b>(<i>node</i>) 472 <b>__checkForM507</b>(<i>node</i>)
423 <p> 473 <p>
424 Private method to check for unused loop variables. 474 Private method to check for unused loop variables.
443 <dt><i>node</i> (ast.Try)</dt> 493 <dt><i>node</i> (ast.Try)</dt>
444 <dd> 494 <dd>
445 reference to the node to be processed 495 reference to the node to be processed
446 </dd> 496 </dd>
447 </dl> 497 </dl>
498 <a NAME="BugBearVisitor.__checkForM513_M529_M530" ID="BugBearVisitor.__checkForM513_M529_M530"></a>
499 <h4>BugBearVisitor.__checkForM513_M529_M530</h4>
500 <b>__checkForM513_M529_M530</b>(<i>node</i>)
501 <p>
502 Private method to check various exception handler situations.
503 </p>
504
505 <dl>
506
507 <dt><i>node</i> (ast.ExceptHandler)</dt>
508 <dd>
509 reference to the node to be processed
510 </dd>
511 </dl>
448 <a NAME="BugBearVisitor.__checkForM515" ID="BugBearVisitor.__checkForM515"></a> 512 <a NAME="BugBearVisitor.__checkForM515" ID="BugBearVisitor.__checkForM515"></a>
449 <h4>BugBearVisitor.__checkForM515</h4> 513 <h4>BugBearVisitor.__checkForM515</h4>
450 <b>__checkForM515</b>(<i>node</i>) 514 <b>__checkForM515</b>(<i>node</i>)
451 <p> 515 <p>
452 Private method to check for pointless comparisons. 516 Private method to check for pointless comparisons.
572 <dd> 636 <dd>
573 reference to the node to be processed 637 reference to the node to be processed
574 or ast.GeneratorExp 638 or ast.GeneratorExp
575 </dd> 639 </dd>
576 </dl> 640 </dl>
577 <a NAME="BugBearVisitor.__checkForM524AndM527" ID="BugBearVisitor.__checkForM524AndM527"></a> 641 <a NAME="BugBearVisitor.__checkForM524_M527" ID="BugBearVisitor.__checkForM524_M527"></a>
578 <h4>BugBearVisitor.__checkForM524AndM527</h4> 642 <h4>BugBearVisitor.__checkForM524_M527</h4>
579 <b>__checkForM524AndM527</b>(<i>node</i>) 643 <b>__checkForM524_M527</b>(<i>node</i>)
580 <p> 644 <p>
581 Private method to check for inheritance from abstract classes in abc and lack of 645 Private method to check for inheritance from abstract classes in abc and lack of
582 any methods decorated with abstract*. 646 any methods decorated with abstract*.
583 </p> 647 </p>
584 648
709 <dt><i>node</i> (ast.DictComp)</dt> 773 <dt><i>node</i> (ast.DictComp)</dt>
710 <dd> 774 <dd>
711 reference to the node to be processed 775 reference to the node to be processed
712 </dd> 776 </dd>
713 </dl> 777 </dl>
778 <a NAME="BugBearVisitor.__checkForM539" ID="BugBearVisitor.__checkForM539"></a>
779 <h4>BugBearVisitor.__checkForM539</h4>
780 <b>__checkForM539</b>(<i>node</i>)
781 <p>
782 Private method to check for correct ContextVar usage.
783 </p>
784
785 <dl>
786
787 <dt><i>node</i> (ast.Call)</dt>
788 <dd>
789 reference to the node to be processed
790 </dd>
791 </dl>
792 <a NAME="BugBearVisitor.__checkForM540AddNote" ID="BugBearVisitor.__checkForM540AddNote"></a>
793 <h4>BugBearVisitor.__checkForM540AddNote</h4>
794 <b>__checkForM540AddNote</b>(<i>node</i>)
795 <p>
796 Private method to check add_note usage.
797 </p>
798
799 <dl>
800
801 <dt><i>node</i> (ast.Attribute)</dt>
802 <dd>
803 reference to the node to be processed
804 </dd>
805 </dl>
806 <dl>
807 <dt>Return:</dt>
808 <dd>
809 flag
810 </dd>
811 </dl>
812 <dl>
813 <dt>Return Type:</dt>
814 <dd>
815 bool
816 </dd>
817 </dl>
818 <a NAME="BugBearVisitor.__checkForM540Usage" ID="BugBearVisitor.__checkForM540Usage"></a>
819 <h4>BugBearVisitor.__checkForM540Usage</h4>
820 <b>__checkForM540Usage</b>(<i>node</i>)
821 <p>
822 Private method to check the usage of exceptions with added note.
823 </p>
824
825 <dl>
826
827 <dt><i>node</i> (ast.expr or None)</dt>
828 <dd>
829 reference to the node to be processed
830 </dd>
831 </dl>
714 <a NAME="BugBearVisitor.__checkForM569" ID="BugBearVisitor.__checkForM569"></a> 832 <a NAME="BugBearVisitor.__checkForM569" ID="BugBearVisitor.__checkForM569"></a>
715 <h4>BugBearVisitor.__checkForM569</h4> 833 <h4>BugBearVisitor.__checkForM569</h4>
716 <b>__checkForM569</b>(<i>node</i>) 834 <b>__checkForM569</b>(<i>node</i>)
717 <p> 835 <p>
718 Private method to check for changes to a loop's mutable iterable. 836 Private method to check for changes to a loop's mutable iterable.
779 <dt>Yield Type:</dt> 897 <dt>Yield Type:</dt>
780 <dd> 898 <dd>
781 ast.Node 899 ast.Node
782 </dd> 900 </dd>
783 </dl> 901 </dl>
784 <a NAME="BugBearVisitor.__composeCallPath" ID="BugBearVisitor.__composeCallPath"></a>
785 <h4>BugBearVisitor.__composeCallPath</h4>
786 <b>__composeCallPath</b>(<i>node</i>)
787 <p>
788 Private method get the individual elements of the call path of a node.
789 </p>
790
791 <dl>
792
793 <dt><i>node</i> (ast.Node)</dt>
794 <dd>
795 reference to the node
796 </dd>
797 </dl>
798 <dl>
799 <dt>Yield:</dt>
800 <dd>
801 one element of the call path
802 </dd>
803 </dl>
804 <dl>
805 <dt>Yield Type:</dt>
806 <dd>
807 ast.Node
808 </dd>
809 </dl>
810 <a NAME="BugBearVisitor.__flattenExcepthandler" ID="BugBearVisitor.__flattenExcepthandler"></a> 902 <a NAME="BugBearVisitor.__flattenExcepthandler" ID="BugBearVisitor.__flattenExcepthandler"></a>
811 <h4>BugBearVisitor.__flattenExcepthandler</h4> 903 <h4>BugBearVisitor.__flattenExcepthandler</h4>
812 <b>__flattenExcepthandler</b>(<i>node</i>) 904 <b>__flattenExcepthandler</b>(<i>node</i>)
813 <p> 905 <p>
814 Private method to flatten the list of exceptions handled by an except handler. 906 Private method to flatten the list of exceptions handled by an except handler.
1086 <dt>Return Type:</dt> 1178 <dt>Return Type:</dt>
1087 <dd> 1179 <dd>
1088 list 1180 list
1089 </dd> 1181 </dd>
1090 </dl> 1182 </dl>
1183 <a NAME="BugBearVisitor.superwalk" ID="BugBearVisitor.superwalk"></a>
1184 <h4>BugBearVisitor.superwalk</h4>
1185 <b>superwalk</b>(<i></i>)
1186 <p>
1187 Function to walk an AST node or a list of AST nodes.
1188 </p>
1189
1190 <dl>
1191
1192 <dt><i>node</i> (ast.AST or list[ast.AST])</dt>
1193 <dd>
1194 reference to the node or a list of nodes to be processed
1195 </dd>
1196 </dl>
1197 <dl>
1198 <dt>Yield:</dt>
1199 <dd>
1200 next node to be processed
1201 </dd>
1202 </dl>
1203 <dl>
1204 <dt>Yield Type:</dt>
1205 <dd>
1206 ast.AST
1207 </dd>
1208 </dl>
1091 <a NAME="BugBearVisitor.toNameStr" ID="BugBearVisitor.toNameStr"></a> 1209 <a NAME="BugBearVisitor.toNameStr" ID="BugBearVisitor.toNameStr"></a>
1092 <h4>BugBearVisitor.toNameStr</h4> 1210 <h4>BugBearVisitor.toNameStr</h4>
1093 <b>toNameStr</b>(<i>node</i>) 1211 <b>toNameStr</b>(<i>node</i>)
1094 <p> 1212 <p>
1095 Public method to turn Name and Attribute nodes to strings, handling any 1213 Public method to turn Name and Attribute nodes to strings, handling any
1182 </p> 1300 </p>
1183 1301
1184 <dl> 1302 <dl>
1185 1303
1186 <dt><i>node</i> (ast.AsyncFor)</dt> 1304 <dt><i>node</i> (ast.AsyncFor)</dt>
1305 <dd>
1306 reference to the node to be processed
1307 </dd>
1308 </dl>
1309 <a NAME="BugBearVisitor.visit_AsyncFunctionDef" ID="BugBearVisitor.visit_AsyncFunctionDef"></a>
1310 <h4>BugBearVisitor.visit_AsyncFunctionDef</h4>
1311 <b>visit_AsyncFunctionDef</b>(<i>node</i>)
1312 <p>
1313 Public method to handle async function definitions.
1314 </p>
1315
1316 <dl>
1317
1318 <dt><i>node</i> (ast.AsyncFunctionDef)</dt>
1187 <dd> 1319 <dd>
1188 reference to the node to be processed 1320 reference to the node to be processed
1189 </dd> 1321 </dd>
1190 </dl> 1322 </dl>
1191 <a NAME="BugBearVisitor.visit_Call" ID="BugBearVisitor.visit_Call"></a> 1323 <a NAME="BugBearVisitor.visit_Call" ID="BugBearVisitor.visit_Call"></a>
1725 </dd> 1857 </dd>
1726 </dl> 1858 </dl>
1727 <div align="right"><a href="#top">Up</a></div> 1859 <div align="right"><a href="#top">Up</a></div>
1728 <hr /> 1860 <hr />
1729 <hr /> 1861 <hr />
1862 <a NAME="FunctionDefDefaultsVisitor" ID="FunctionDefDefaultsVisitor"></a>
1863 <h2>FunctionDefDefaultsVisitor</h2>
1864 <p>
1865 Class used by M506, M508 and M539.
1866 </p>
1867
1868 <h3>Derived from</h3>
1869 ast.NodeVisitor
1870 <h3>Class Attributes</h3>
1871 <table>
1872 <tr><td>None</td></tr>
1873 </table>
1874
1875 <h3>Class Methods</h3>
1876 <table>
1877 <tr><td>None</td></tr>
1878 </table>
1879
1880 <h3>Methods</h3>
1881 <table>
1882 <tr>
1883 <td><a href="#FunctionDefDefaultsVisitor.__init__">FunctionDefDefaultsVisitor</a></td>
1884 <td>Constructor</td>
1885 </tr>
1886 <tr>
1887 <td><a href="#FunctionDefDefaultsVisitor.__visitMutableLiteralOrComprehension">__visitMutableLiteralOrComprehension</a></td>
1888 <td>Private method to flag mutable literals and comprehensions.</td>
1889 </tr>
1890 <tr>
1891 <td><a href="#FunctionDefDefaultsVisitor.visit">visit</a></td>
1892 <td>Public method to traverse an AST node or a list of AST nodes.</td>
1893 </tr>
1894 <tr>
1895 <td><a href="#FunctionDefDefaultsVisitor.visit_Call">visit_Call</a></td>
1896 <td>Public method to process Call nodes.</td>
1897 </tr>
1898 <tr>
1899 <td><a href="#FunctionDefDefaultsVisitor.visit_Lambda">visit_Lambda</a></td>
1900 <td>Public method to process Lambda nodes.</td>
1901 </tr>
1902 </table>
1903
1904 <h3>Static Methods</h3>
1905 <table>
1906 <tr><td>None</td></tr>
1907 </table>
1908
1909
1910 <a NAME="FunctionDefDefaultsVisitor.__init__" ID="FunctionDefDefaultsVisitor.__init__"></a>
1911 <h4>FunctionDefDefaultsVisitor (Constructor)</h4>
1912 <b>FunctionDefDefaultsVisitor</b>(<i>errorCodeCalls, errorCodeLiterals, </i>)
1913 <p>
1914 Constructor
1915 </p>
1916
1917 <dl>
1918
1919 <dt><i>errorCodeCalls</i> (str)</dt>
1920 <dd>
1921 error code for ast.Call nodes
1922 </dd>
1923 <dt><i>errorCodeLiterals</i> (str)</dt>
1924 <dd>
1925 error code for literal nodes
1926 </dd>
1927 </dl>
1928 <a NAME="FunctionDefDefaultsVisitor.__visitMutableLiteralOrComprehension" ID="FunctionDefDefaultsVisitor.__visitMutableLiteralOrComprehension"></a>
1929 <h4>FunctionDefDefaultsVisitor.__visitMutableLiteralOrComprehension</h4>
1930 <b>__visitMutableLiteralOrComprehension</b>(<i>node</i>)
1931 <p>
1932 Private method to flag mutable literals and comprehensions.
1933 </p>
1934
1935 <dl>
1936
1937 <dt><i>node</i> (ast.Dict, ast.List, ast.Set, ast.ListComp, ast.DictComp or ast.SetComp)</dt>
1938 <dd>
1939 AST node to be processed
1940 </dd>
1941 </dl>
1942 <a NAME="FunctionDefDefaultsVisitor.visit" ID="FunctionDefDefaultsVisitor.visit"></a>
1943 <h4>FunctionDefDefaultsVisitor.visit</h4>
1944 <b>visit</b>(<i>node</i>)
1945 <p>
1946 Public method to traverse an AST node or a list of AST nodes.
1947 </p>
1948 <p>
1949 This is an extended method that can also handle a list of AST nodes.
1950 </p>
1951
1952 <dl>
1953
1954 <dt><i>node</i> (ast.AST or list of ast.AST)</dt>
1955 <dd>
1956 AST node or list of AST nodes to be processed
1957 </dd>
1958 </dl>
1959 <a NAME="FunctionDefDefaultsVisitor.visit_Call" ID="FunctionDefDefaultsVisitor.visit_Call"></a>
1960 <h4>FunctionDefDefaultsVisitor.visit_Call</h4>
1961 <b>visit_Call</b>(<i>node</i>)
1962 <p>
1963 Public method to process Call nodes.
1964 </p>
1965
1966 <dl>
1967
1968 <dt><i>node</i> (ast.Call)</dt>
1969 <dd>
1970 AST node to be processed
1971 </dd>
1972 </dl>
1973 <a NAME="FunctionDefDefaultsVisitor.visit_Lambda" ID="FunctionDefDefaultsVisitor.visit_Lambda"></a>
1974 <h4>FunctionDefDefaultsVisitor.visit_Lambda</h4>
1975 <b>visit_Lambda</b>(<i>node</i>)
1976 <p>
1977 Public method to process Lambda nodes.
1978 </p>
1979
1980 <dl>
1981
1982 <dt><i>node</i> (ast.Lambda)</dt>
1983 <dd>
1984 AST node to be processed
1985 </dd>
1986 </dl>
1987 <div align="right"><a href="#top">Up</a></div>
1988 <hr />
1989 <hr />
1730 <a NAME="M520NameFinder" ID="M520NameFinder"></a> 1990 <a NAME="M520NameFinder" ID="M520NameFinder"></a>
1731 <h2>M520NameFinder</h2> 1991 <h2>M520NameFinder</h2>
1732 <p> 1992 <p>
1733 Class to extract a name out of a tree of nodes ignoring names defined within the 1993 Class to extract a name out of a tree of nodes ignoring names defined within the
1734 local scope of a comprehension. 1994 local scope of a comprehension.
1844 <dt><i>node</i> (ast.comprehension)</dt> 2104 <dt><i>node</i> (ast.comprehension)</dt>
1845 <dd> 2105 <dd>
1846 reference to the node to be processed 2106 reference to the node to be processed
1847 </dd> 2107 </dd>
1848 </dl> 2108 </dl>
2109 <div align="right"><a href="#top">Up</a></div>
2110 <hr />
2111 <hr />
2112 <a NAME="M540CaughtException" ID="M540CaughtException"></a>
2113 <h2>M540CaughtException</h2>
2114 <p>
2115 Class to hold the data for a caught exception.
2116 </p>
2117
2118 <h3>Derived from</h3>
2119 None
2120 <h3>Class Attributes</h3>
2121 <table>
2122 <tr><td>hasNote</td></tr>
2123 <tr><td>name</td></tr>
2124 </table>
2125
2126 <h3>Class Methods</h3>
2127 <table>
2128 <tr><td>None</td></tr>
2129 </table>
2130
2131 <h3>Methods</h3>
2132 <table>
2133 <tr><td>None</td></tr>
2134 </table>
2135
2136 <h3>Static Methods</h3>
2137 <table>
2138 <tr><td>None</td></tr>
2139 </table>
2140
2141
1849 <div align="right"><a href="#top">Up</a></div> 2142 <div align="right"><a href="#top">Up</a></div>
1850 <hr /> 2143 <hr />
1851 <hr /> 2144 <hr />
1852 <a NAME="M569Checker" ID="M569Checker"></a> 2145 <a NAME="M569Checker" ID="M569Checker"></a>
1853 <h2>M569Checker</h2> 2146 <h2>M569Checker</h2>
2054 <tr> 2347 <tr>
2055 <td><a href="#MiscellaneousChecker.__checkLineContinuation">__checkLineContinuation</a></td> 2348 <td><a href="#MiscellaneousChecker.__checkLineContinuation">__checkLineContinuation</a></td>
2056 <td>Private method to check line continuation using backslash.</td> 2349 <td>Private method to check line continuation using backslash.</td>
2057 </tr> 2350 </tr>
2058 <tr> 2351 <tr>
2059 <td><a href="#MiscellaneousChecker.__checkMutableDefault">__checkMutableDefault</a></td>
2060 <td>Private method to check for use of mutable types as default arguments.</td>
2061 </tr>
2062 <tr>
2063 <td><a href="#MiscellaneousChecker.__checkPep3101">__checkPep3101</a></td> 2352 <td><a href="#MiscellaneousChecker.__checkPep3101">__checkPep3101</a></td>
2064 <td>Private method to check for old style string formatting.</td> 2353 <td>Private method to check for old style string formatting.</td>
2065 </tr> 2354 </tr>
2066 <tr> 2355 <tr>
2067 <td><a href="#MiscellaneousChecker.__checkPrintStatements">__checkPrintStatements</a></td> 2356 <td><a href="#MiscellaneousChecker.__checkPrintStatements">__checkPrintStatements</a></td>
2260 <a NAME="MiscellaneousChecker.__checkLineContinuation" ID="MiscellaneousChecker.__checkLineContinuation"></a> 2549 <a NAME="MiscellaneousChecker.__checkLineContinuation" ID="MiscellaneousChecker.__checkLineContinuation"></a>
2261 <h4>MiscellaneousChecker.__checkLineContinuation</h4> 2550 <h4>MiscellaneousChecker.__checkLineContinuation</h4>
2262 <b>__checkLineContinuation</b>(<i></i>) 2551 <b>__checkLineContinuation</b>(<i></i>)
2263 <p> 2552 <p>
2264 Private method to check line continuation using backslash. 2553 Private method to check line continuation using backslash.
2265 </p>
2266
2267 <a NAME="MiscellaneousChecker.__checkMutableDefault" ID="MiscellaneousChecker.__checkMutableDefault"></a>
2268 <h4>MiscellaneousChecker.__checkMutableDefault</h4>
2269 <b>__checkMutableDefault</b>(<i></i>)
2270 <p>
2271 Private method to check for use of mutable types as default arguments.
2272 </p> 2554 </p>
2273 2555
2274 <a NAME="MiscellaneousChecker.__checkPep3101" ID="MiscellaneousChecker.__checkPep3101"></a> 2556 <a NAME="MiscellaneousChecker.__checkPep3101" ID="MiscellaneousChecker.__checkPep3101"></a>
2275 <h4>MiscellaneousChecker.__checkPep3101</h4> 2557 <h4>MiscellaneousChecker.__checkPep3101</h4>
2276 <b>__checkPep3101</b>(<i></i>) 2558 <b>__checkPep3101</b>(<i></i>)

eric ide

mercurial