38 <td>Represents the binding of a value to a name.</td> |
38 <td>Represents the binding of a value to a name.</td> |
39 </tr><tr> |
39 </tr><tr> |
40 <td><a href="#Checker">Checker</a></td> |
40 <td><a href="#Checker">Checker</a></td> |
41 <td>Class to check the cleanliness and sanity of Python code.</td> |
41 <td>Class to check the cleanliness and sanity of Python code.</td> |
42 </tr><tr> |
42 </tr><tr> |
|
43 <td><a href="#ClassDefinition">ClassDefinition</a></td> |
|
44 <td>Represents a class definition.</td> |
|
45 </tr><tr> |
43 <td><a href="#ClassScope">ClassScope</a></td> |
46 <td><a href="#ClassScope">ClassScope</a></td> |
44 <td>Class representing a name scope for a class.</td> |
47 <td>Class representing a name scope for a class.</td> |
45 </tr><tr> |
48 </tr><tr> |
|
49 <td><a href="#Definition">Definition</a></td> |
|
50 <td>A binding that defines a function or a class.</td> |
|
51 </tr><tr> |
46 <td><a href="#ExportBinding">ExportBinding</a></td> |
52 <td><a href="#ExportBinding">ExportBinding</a></td> |
47 <td>A binding created by an __all__ assignment.</td> |
53 <td>A binding created by an __all__ assignment.</td> |
48 </tr><tr> |
54 </tr><tr> |
49 <td><a href="#FunctionDefinition">FunctionDefinition</a></td> |
55 <td><a href="#FunctionDefinition">FunctionDefinition</a></td> |
50 <td>Represents a function definition.</td> |
56 <td>Represents a function definition.</td> |
51 </tr><tr> |
57 </tr><tr> |
52 <td><a href="#FunctionScope">FunctionScope</a></td> |
58 <td><a href="#FunctionScope">FunctionScope</a></td> |
53 <td>Class representing a name scope for a function.</td> |
59 <td>Class representing a name scope for a function.</td> |
54 </tr><tr> |
60 </tr><tr> |
|
61 <td><a href="#GeneratorScope">GeneratorScope</a></td> |
|
62 <td>Class representing a name scope for a generator function.</td> |
|
63 </tr><tr> |
55 <td><a href="#Importation">Importation</a></td> |
64 <td><a href="#Importation">Importation</a></td> |
56 <td>A binding created by an import statement.</td> |
65 <td>A binding created by an import statement.</td> |
57 </tr><tr> |
66 </tr><tr> |
58 <td><a href="#ModuleScope">ModuleScope</a></td> |
67 <td><a href="#ModuleScope">ModuleScope</a></td> |
59 <td>Class representing a name scope for a module.</td> |
68 <td>Class representing a name scope for a module.</td> |
60 </tr><tr> |
69 </tr><tr> |
61 <td><a href="#Scope">Scope</a></td> |
70 <td><a href="#Scope">Scope</a></td> |
62 <td>Class defining the scope base class.</td> |
71 <td>Class defining the scope base class.</td> |
63 </tr><tr> |
|
64 <td><a href="#UnBinding">UnBinding</a></td> |
|
65 <td>Created by the 'del' operator.</td> |
|
66 </tr> |
72 </tr> |
67 </table> |
73 </table> |
68 <h3>Functions</h3> |
74 <h3>Functions</h3> |
69 <table> |
75 <table> |
70 <tr> |
76 <tr> |
|
77 <td><a href="#__init__">__init__</a></td> |
|
78 <td></td> |
|
79 </tr><tr> |
|
80 <td><a href="#__init___1">__init__</a></td> |
|
81 <td></td> |
|
82 </tr><tr> |
|
83 <td><a href="#__init___2">__init__</a></td> |
|
84 <td></td> |
|
85 </tr><tr> |
|
86 <td><a href="#__repr__">__repr__</a></td> |
|
87 <td></td> |
|
88 </tr><tr> |
|
89 <td><a href="#__repr___1">__repr__</a></td> |
|
90 <td></td> |
|
91 </tr><tr> |
|
92 <td><a href="#__str__">__str__</a></td> |
|
93 <td></td> |
|
94 </tr><tr> |
|
95 <td><a href="#getNodeName">getNodeName</a></td> |
|
96 <td>Module function for getting the name of a node.</td> |
|
97 </tr><tr> |
|
98 <td><a href="#getNodeType">getNodeType</a></td> |
|
99 <td></td> |
|
100 </tr><tr> |
|
101 <td><a href="#getNodeType_1">getNodeType</a></td> |
|
102 <td></td> |
|
103 </tr><tr> |
71 <td><a href="#iter_child_nodes">iter_child_nodes</a></td> |
104 <td><a href="#iter_child_nodes">iter_child_nodes</a></td> |
72 <td>Yield all direct child nodes of *node*, that is, all fields that are nodes and all items of fields that are lists of nodes.</td> |
105 <td>Yield all direct child nodes of *node*, that is, all fields that are nodes and all items of fields that are lists of nodes.</td> |
|
106 </tr><tr> |
|
107 <td><a href="#names">names</a></td> |
|
108 <td>Return a list of the names referenced by this binding.</td> |
|
109 </tr><tr> |
|
110 <td><a href="#unusedAssignments">unusedAssignments</a></td> |
|
111 <td>Return a generator for the assignments which have not been used.</td> |
73 </tr> |
112 </tr> |
74 </table> |
113 </table> |
75 <hr /><hr /> |
114 <hr /><hr /> |
76 <a NAME="Argument" ID="Argument"></a> |
115 <a NAME="Argument" ID="Argument"></a> |
77 <h2>Argument</h2> |
116 <h2>Argument</h2> |
230 </tr><tr> |
257 </tr><tr> |
231 <td><a href="#Checker.LISTCOMP">LISTCOMP</a></td> |
258 <td><a href="#Checker.LISTCOMP">LISTCOMP</a></td> |
232 <td></td> |
259 <td></td> |
233 </tr><tr> |
260 </tr><tr> |
234 <td><a href="#Checker.NAME">NAME</a></td> |
261 <td><a href="#Checker.NAME">NAME</a></td> |
235 <td>Locate the name in locals / function / globals scopes.</td> |
262 <td>Handle occurrence of Name (which can be a load/store/delete access.)</td> |
236 </tr><tr> |
263 </tr><tr> |
237 <td><a href="#Checker._runDeferred">_runDeferred</a></td> |
264 <td><a href="#Checker.TRY">TRY</a></td> |
238 <td>Run the callables in deferred using their associated scope stack.</td> |
265 <td></td> |
239 </tr><tr> |
266 </tr><tr> |
240 <td><a href="#Checker.addArgs">addArgs</a></td> |
267 <td><a href="#Checker.addArgs">addArgs</a></td> |
241 <td></td> |
268 <td></td> |
242 </tr><tr> |
269 </tr><tr> |
243 <td><a href="#Checker.addBinding">addBinding</a></td> |
270 <td><a href="#Checker.addBinding">addBinding</a></td> |
244 <td>Called when a binding is altered.</td> |
271 <td>Called when a binding is altered.</td> |
245 </tr><tr> |
272 </tr><tr> |
|
273 <td><a href="#Checker.checkDeadScopes">checkDeadScopes</a></td> |
|
274 <td>Look at scopes which have been fully examined and report names in them which were imported but unused.</td> |
|
275 </tr><tr> |
246 <td><a href="#Checker.checkUnusedAssignments">checkUnusedAssignments</a></td> |
276 <td><a href="#Checker.checkUnusedAssignments">checkUnusedAssignments</a></td> |
247 <td>Check to see if any assignments have not been used.</td> |
277 <td>Check to see if any assignments have not been used.</td> |
248 </tr><tr> |
278 </tr><tr> |
249 <td><a href="#Checker.check_dead_scopes">check_dead_scopes</a></td> |
|
250 <td>Look at scopes which have been fully examined and report names in them which were imported but unused.</td> |
|
251 </tr><tr> |
|
252 <td><a href="#Checker.collectLoopVars">collectLoopVars</a></td> |
279 <td><a href="#Checker.collectLoopVars">collectLoopVars</a></td> |
253 <td></td> |
280 <td></td> |
254 </tr><tr> |
281 </tr><tr> |
255 <td><a href="#Checker.deferAssignment">deferAssignment</a></td> |
282 <td><a href="#Checker.deferAssignment">deferAssignment</a></td> |
256 <td>Schedule an assignment handler to be called just after deferred function handlers.</td> |
283 <td>Schedule an assignment handler to be called just after deferred function handlers.</td> |
257 </tr><tr> |
284 </tr><tr> |
258 <td><a href="#Checker.deferFunction">deferFunction</a></td> |
285 <td><a href="#Checker.deferFunction">deferFunction</a></td> |
259 <td>Schedule a function handler to be called just before completion.</td> |
286 <td>Schedule a function handler to be called just before completion.</td> |
260 </tr><tr> |
287 </tr><tr> |
|
288 <td><a href="#Checker.descendantOf">descendantOf</a></td> |
|
289 <td></td> |
|
290 </tr><tr> |
|
291 <td><a href="#Checker.differentForks">differentForks</a></td> |
|
292 <td>True, if lnode and rnode are located on different forks of IF/TRY</td> |
|
293 </tr><tr> |
|
294 <td><a href="#Checker.getCommonAncestor">getCommonAncestor</a></td> |
|
295 <td></td> |
|
296 </tr><tr> |
|
297 <td><a href="#Checker.getDocstring">getDocstring</a></td> |
|
298 <td></td> |
|
299 </tr><tr> |
|
300 <td><a href="#Checker.getNodeHandler">getNodeHandler</a></td> |
|
301 <td></td> |
|
302 </tr><tr> |
261 <td><a href="#Checker.handleChildren">handleChildren</a></td> |
303 <td><a href="#Checker.handleChildren">handleChildren</a></td> |
262 <td></td> |
304 <td></td> |
263 </tr><tr> |
305 </tr><tr> |
|
306 <td><a href="#Checker.handleDoctests">handleDoctests</a></td> |
|
307 <td></td> |
|
308 </tr><tr> |
264 <td><a href="#Checker.handleNode">handleNode</a></td> |
309 <td><a href="#Checker.handleNode">handleNode</a></td> |
|
310 <td></td> |
|
311 </tr><tr> |
|
312 <td><a href="#Checker.handleNodeDelete">handleNodeDelete</a></td> |
|
313 <td></td> |
|
314 </tr><tr> |
|
315 <td><a href="#Checker.handleNodeLoad">handleNodeLoad</a></td> |
|
316 <td></td> |
|
317 </tr><tr> |
|
318 <td><a href="#Checker.handleNodeStore">handleNodeStore</a></td> |
|
319 <td></td> |
|
320 </tr><tr> |
|
321 <td><a href="#Checker.hasParent">hasParent</a></td> |
265 <td></td> |
322 <td></td> |
266 </tr><tr> |
323 </tr><tr> |
267 <td><a href="#Checker.ignore">ignore</a></td> |
324 <td><a href="#Checker.ignore">ignore</a></td> |
268 <td></td> |
325 <td></td> |
269 </tr><tr> |
326 </tr><tr> |
270 <td><a href="#Checker.isDocstring">isDocstring</a></td> |
327 <td><a href="#Checker.isDocstring">isDocstring</a></td> |
271 <td>Determine if the given node is a docstring, as long as it is at the correct place in the node tree.</td> |
328 <td>Determine if the given node is a docstring, as long as it is at the correct place in the node tree.</td> |
272 </tr><tr> |
329 </tr><tr> |
|
330 <td><a href="#Checker.onFork">onFork</a></td> |
|
331 <td></td> |
|
332 </tr><tr> |
273 <td><a href="#Checker.popScope">popScope</a></td> |
333 <td><a href="#Checker.popScope">popScope</a></td> |
274 <td></td> |
334 <td></td> |
275 </tr><tr> |
335 </tr><tr> |
276 <td><a href="#Checker.pushClassScope">pushClassScope</a></td> |
336 <td><a href="#Checker.pushClassScope">pushClassScope</a></td> |
277 <td></td> |
337 <td></td> |
278 </tr><tr> |
338 </tr><tr> |
279 <td><a href="#Checker.pushFunctionScope">pushFunctionScope</a></td> |
339 <td><a href="#Checker.pushFunctionScope">pushFunctionScope</a></td> |
280 <td></td> |
340 <td></td> |
281 </tr><tr> |
341 </tr><tr> |
|
342 <td><a href="#Checker.pushScope">pushScope</a></td> |
|
343 <td></td> |
|
344 </tr><tr> |
282 <td><a href="#Checker.report">report</a></td> |
345 <td><a href="#Checker.report">report</a></td> |
283 <td></td> |
346 <td></td> |
|
347 </tr><tr> |
|
348 <td><a href="#Checker.runDeferred">runDeferred</a></td> |
|
349 <td>Run the callables in deferred using their associated scope stack.</td> |
284 </tr><tr> |
350 </tr><tr> |
285 <td><a href="#Checker.runFunction">runFunction</a></td> |
351 <td><a href="#Checker.runFunction">runFunction</a></td> |
286 <td></td> |
352 <td></td> |
287 </tr><tr> |
353 </tr><tr> |
288 <td><a href="#Checker.scope">scope</a></td> |
354 <td><a href="#Checker.scope">scope</a></td> |
320 classes, and the body of its definition. Additionally, add its name to |
389 classes, and the body of its definition. Additionally, add its name to |
321 the current scope. |
390 the current scope. |
322 </p><a NAME="Checker.DICTCOMP" ID="Checker.DICTCOMP"></a> |
391 </p><a NAME="Checker.DICTCOMP" ID="Checker.DICTCOMP"></a> |
323 <h4>Checker.DICTCOMP</h4> |
392 <h4>Checker.DICTCOMP</h4> |
324 <b>DICTCOMP</b>(<i>node</i>) |
393 <b>DICTCOMP</b>(<i>node</i>) |
|
394 <a NAME="Checker.EXCEPTHANDLER" ID="Checker.EXCEPTHANDLER"></a> |
|
395 <h4>Checker.EXCEPTHANDLER</h4> |
|
396 <b>EXCEPTHANDLER</b>(<i>node</i>) |
325 <a NAME="Checker.FOR" ID="Checker.FOR"></a> |
397 <a NAME="Checker.FOR" ID="Checker.FOR"></a> |
326 <h4>Checker.FOR</h4> |
398 <h4>Checker.FOR</h4> |
327 <b>FOR</b>(<i>node</i>) |
399 <b>FOR</b>(<i>node</i>) |
328 <p> |
400 <p> |
329 Process bindings for loop variables. |
401 Process bindings for loop variables. |
330 </p><a NAME="Checker.FUNCTIONDEF" ID="Checker.FUNCTIONDEF"></a> |
402 </p><a NAME="Checker.FUNCTIONDEF" ID="Checker.FUNCTIONDEF"></a> |
331 <h4>Checker.FUNCTIONDEF</h4> |
403 <h4>Checker.FUNCTIONDEF</h4> |
332 <b>FUNCTIONDEF</b>(<i>node</i>) |
404 <b>FUNCTIONDEF</b>(<i>node</i>) |
|
405 <a NAME="Checker.GENERATOREXP" ID="Checker.GENERATOREXP"></a> |
|
406 <h4>Checker.GENERATOREXP</h4> |
|
407 <b>GENERATOREXP</b>(<i>node</i>) |
333 <a NAME="Checker.GLOBAL" ID="Checker.GLOBAL"></a> |
408 <a NAME="Checker.GLOBAL" ID="Checker.GLOBAL"></a> |
334 <h4>Checker.GLOBAL</h4> |
409 <h4>Checker.GLOBAL</h4> |
335 <b>GLOBAL</b>(<i>node</i>) |
410 <b>GLOBAL</b>(<i>node</i>) |
336 <p> |
411 <p> |
337 Keep track of globals declarations. |
412 Keep track of globals declarations. |
349 <b>LISTCOMP</b>(<i>node</i>) |
424 <b>LISTCOMP</b>(<i>node</i>) |
350 <a NAME="Checker.NAME" ID="Checker.NAME"></a> |
425 <a NAME="Checker.NAME" ID="Checker.NAME"></a> |
351 <h4>Checker.NAME</h4> |
426 <h4>Checker.NAME</h4> |
352 <b>NAME</b>(<i>node</i>) |
427 <b>NAME</b>(<i>node</i>) |
353 <p> |
428 <p> |
354 Locate the name in locals / function / globals scopes. |
429 Handle occurrence of Name (which can be a load/store/delete access.) |
355 </p><a NAME="Checker._runDeferred" ID="Checker._runDeferred"></a> |
430 </p><a NAME="Checker.TRY" ID="Checker.TRY"></a> |
356 <h4>Checker._runDeferred</h4> |
431 <h4>Checker.TRY</h4> |
357 <b>_runDeferred</b>(<i>deferred</i>) |
432 <b>TRY</b>(<i>node</i>) |
358 <p> |
433 <a NAME="Checker.addArgs" ID="Checker.addArgs"></a> |
359 Run the callables in deferred using their associated scope stack. |
|
360 </p><a NAME="Checker.addArgs" ID="Checker.addArgs"></a> |
|
361 <h4>Checker.addArgs</h4> |
434 <h4>Checker.addArgs</h4> |
362 <b>addArgs</b>(<i></i>) |
435 <b>addArgs</b>(<i></i>) |
363 <a NAME="Checker.addBinding" ID="Checker.addBinding"></a> |
436 <a NAME="Checker.addBinding" ID="Checker.addBinding"></a> |
364 <h4>Checker.addBinding</h4> |
437 <h4>Checker.addBinding</h4> |
365 <b>addBinding</b>(<i>lineno, value, reportRedef=True</i>) |
438 <b>addBinding</b>(<i>node, value, reportRedef=True</i>) |
366 <p> |
439 <p> |
367 Called when a binding is altered. |
440 Called when a binding is altered. |
368 </p><dl> |
441 </p><p> |
369 <dt><i>lineno</i></dt> |
442 - `node` is the statement responsible for the change |
370 <dd> |
443 - `value` is the optional new value, a Binding instance, associated |
371 line of the statement responsible for the change |
444 with the binding; if None, the binding is deleted if it exists. |
372 (integer) |
445 - if `reportRedef` is True (default), rebinding while unused will be |
373 </dd><dt><i>value</i></dt> |
446 reported. |
374 <dd> |
447 </p><a NAME="Checker.checkDeadScopes" ID="Checker.checkDeadScopes"></a> |
375 the optional new value, a Binding instance, associated |
448 <h4>Checker.checkDeadScopes</h4> |
376 with the binding; if None, the binding is deleted if it exists |
449 <b>checkDeadScopes</b>(<i></i>) |
377 </dd><dt><i>reportRedef</i></dt> |
450 <p> |
378 <dd> |
451 Look at scopes which have been fully examined and report names in them |
379 flag indicating if rebinding while unused will be |
452 which were imported but unused. |
380 reported (boolean) |
453 </p><a NAME="Checker.checkUnusedAssignments" ID="Checker.checkUnusedAssignments"></a> |
381 </dd> |
|
382 </dl><a NAME="Checker.checkUnusedAssignments" ID="Checker.checkUnusedAssignments"></a> |
|
383 <h4>Checker.checkUnusedAssignments</h4> |
454 <h4>Checker.checkUnusedAssignments</h4> |
384 <b>checkUnusedAssignments</b>(<i></i>) |
455 <b>checkUnusedAssignments</b>(<i></i>) |
385 <p> |
456 <p> |
386 Check to see if any assignments have not been used. |
457 Check to see if any assignments have not been used. |
387 </p><a NAME="Checker.check_dead_scopes" ID="Checker.check_dead_scopes"></a> |
|
388 <h4>Checker.check_dead_scopes</h4> |
|
389 <b>check_dead_scopes</b>(<i></i>) |
|
390 <p> |
|
391 Look at scopes which have been fully examined and report names in them |
|
392 which were imported but unused. |
|
393 </p><a NAME="Checker.collectLoopVars" ID="Checker.collectLoopVars"></a> |
458 </p><a NAME="Checker.collectLoopVars" ID="Checker.collectLoopVars"></a> |
394 <h4>Checker.collectLoopVars</h4> |
459 <h4>Checker.collectLoopVars</h4> |
395 <b>collectLoopVars</b>(<i></i>) |
460 <b>collectLoopVars</b>(<i></i>) |
396 <a NAME="Checker.deferAssignment" ID="Checker.deferAssignment"></a> |
461 <a NAME="Checker.deferAssignment" ID="Checker.deferAssignment"></a> |
397 <h4>Checker.deferAssignment</h4> |
462 <h4>Checker.deferAssignment</h4> |
407 </p><p> |
472 </p><p> |
408 This is used for handling function bodies, which must be deferred |
473 This is used for handling function bodies, which must be deferred |
409 because code later in the file might modify the global scope. When |
474 because code later in the file might modify the global scope. When |
410 `callable` is called, the scope at the time this is called will be |
475 `callable` is called, the scope at the time this is called will be |
411 restored, however it will contain any new bindings added to it. |
476 restored, however it will contain any new bindings added to it. |
412 </p><a NAME="Checker.handleChildren" ID="Checker.handleChildren"></a> |
477 </p><a NAME="Checker.descendantOf" ID="Checker.descendantOf"></a> |
|
478 <h4>Checker.descendantOf</h4> |
|
479 <b>descendantOf</b>(<i>node, ancestors, stop=None</i>) |
|
480 <a NAME="Checker.differentForks" ID="Checker.differentForks"></a> |
|
481 <h4>Checker.differentForks</h4> |
|
482 <b>differentForks</b>(<i>lnode, rnode</i>) |
|
483 <p> |
|
484 True, if lnode and rnode are located on different forks of IF/TRY |
|
485 </p><a NAME="Checker.getCommonAncestor" ID="Checker.getCommonAncestor"></a> |
|
486 <h4>Checker.getCommonAncestor</h4> |
|
487 <b>getCommonAncestor</b>(<i>lnode, rnode, stop=None</i>) |
|
488 <a NAME="Checker.getDocstring" ID="Checker.getDocstring"></a> |
|
489 <h4>Checker.getDocstring</h4> |
|
490 <b>getDocstring</b>(<i>node</i>) |
|
491 <a NAME="Checker.getNodeHandler" ID="Checker.getNodeHandler"></a> |
|
492 <h4>Checker.getNodeHandler</h4> |
|
493 <b>getNodeHandler</b>(<i>node_class</i>) |
|
494 <a NAME="Checker.handleChildren" ID="Checker.handleChildren"></a> |
413 <h4>Checker.handleChildren</h4> |
495 <h4>Checker.handleChildren</h4> |
414 <b>handleChildren</b>(<i>tree</i>) |
496 <b>handleChildren</b>(<i>tree</i>) |
|
497 <a NAME="Checker.handleDoctests" ID="Checker.handleDoctests"></a> |
|
498 <h4>Checker.handleDoctests</h4> |
|
499 <b>handleDoctests</b>(<i>node</i>) |
415 <a NAME="Checker.handleNode" ID="Checker.handleNode"></a> |
500 <a NAME="Checker.handleNode" ID="Checker.handleNode"></a> |
416 <h4>Checker.handleNode</h4> |
501 <h4>Checker.handleNode</h4> |
417 <b>handleNode</b>(<i>node, parent</i>) |
502 <b>handleNode</b>(<i>node, parent</i>) |
|
503 <a NAME="Checker.handleNodeDelete" ID="Checker.handleNodeDelete"></a> |
|
504 <h4>Checker.handleNodeDelete</h4> |
|
505 <b>handleNodeDelete</b>(<i>node</i>) |
|
506 <a NAME="Checker.handleNodeLoad" ID="Checker.handleNodeLoad"></a> |
|
507 <h4>Checker.handleNodeLoad</h4> |
|
508 <b>handleNodeLoad</b>(<i>node</i>) |
|
509 <a NAME="Checker.handleNodeStore" ID="Checker.handleNodeStore"></a> |
|
510 <h4>Checker.handleNodeStore</h4> |
|
511 <b>handleNodeStore</b>(<i>node</i>) |
|
512 <a NAME="Checker.hasParent" ID="Checker.hasParent"></a> |
|
513 <h4>Checker.hasParent</h4> |
|
514 <b>hasParent</b>(<i>node, kind</i>) |
418 <a NAME="Checker.ignore" ID="Checker.ignore"></a> |
515 <a NAME="Checker.ignore" ID="Checker.ignore"></a> |
419 <h4>Checker.ignore</h4> |
516 <h4>Checker.ignore</h4> |
420 <b>ignore</b>(<i>node</i>) |
517 <b>ignore</b>(<i>node</i>) |
421 <a NAME="Checker.isDocstring" ID="Checker.isDocstring"></a> |
518 <a NAME="Checker.isDocstring" ID="Checker.isDocstring"></a> |
422 <h4>Checker.isDocstring</h4> |
519 <h4>Checker.isDocstring</h4> |
423 <b>isDocstring</b>(<i>node</i>) |
520 <b>isDocstring</b>(<i>node</i>) |
424 <p> |
521 <p> |
425 Determine if the given node is a docstring, as long as it is at the |
522 Determine if the given node is a docstring, as long as it is at the |
426 correct place in the node tree. |
523 correct place in the node tree. |
427 </p><a NAME="Checker.popScope" ID="Checker.popScope"></a> |
524 </p><a NAME="Checker.onFork" ID="Checker.onFork"></a> |
|
525 <h4>Checker.onFork</h4> |
|
526 <b>onFork</b>(<i>parent, lnode, rnode, items</i>) |
|
527 <a NAME="Checker.popScope" ID="Checker.popScope"></a> |
428 <h4>Checker.popScope</h4> |
528 <h4>Checker.popScope</h4> |
429 <b>popScope</b>(<i></i>) |
529 <b>popScope</b>(<i></i>) |
430 <a NAME="Checker.pushClassScope" ID="Checker.pushClassScope"></a> |
530 <a NAME="Checker.pushClassScope" ID="Checker.pushClassScope"></a> |
431 <h4>Checker.pushClassScope</h4> |
531 <h4>Checker.pushClassScope</h4> |
432 <b>pushClassScope</b>(<i></i>) |
532 <b>pushClassScope</b>(<i></i>) |
433 <a NAME="Checker.pushFunctionScope" ID="Checker.pushFunctionScope"></a> |
533 <a NAME="Checker.pushFunctionScope" ID="Checker.pushFunctionScope"></a> |
434 <h4>Checker.pushFunctionScope</h4> |
534 <h4>Checker.pushFunctionScope</h4> |
435 <b>pushFunctionScope</b>(<i></i>) |
535 <b>pushFunctionScope</b>(<i></i>) |
|
536 <a NAME="Checker.pushScope" ID="Checker.pushScope"></a> |
|
537 <h4>Checker.pushScope</h4> |
|
538 <b>pushScope</b>(<i>scopeClass=FunctionScope</i>) |
436 <a NAME="Checker.report" ID="Checker.report"></a> |
539 <a NAME="Checker.report" ID="Checker.report"></a> |
437 <h4>Checker.report</h4> |
540 <h4>Checker.report</h4> |
438 <b>report</b>(<i>messageClass, *args, **kwargs</i>) |
541 <b>report</b>(<i>messageClass, *args, **kwargs</i>) |
439 <a NAME="Checker.runFunction" ID="Checker.runFunction"></a> |
542 <a NAME="Checker.runDeferred" ID="Checker.runDeferred"></a> |
|
543 <h4>Checker.runDeferred</h4> |
|
544 <b>runDeferred</b>(<i>deferred</i>) |
|
545 <p> |
|
546 Run the callables in deferred using their associated scope stack. |
|
547 </p><a NAME="Checker.runFunction" ID="Checker.runFunction"></a> |
440 <h4>Checker.runFunction</h4> |
548 <h4>Checker.runFunction</h4> |
441 <b>runFunction</b>(<i></i>) |
549 <b>runFunction</b>(<i></i>) |
442 <a NAME="Checker.scope" ID="Checker.scope"></a> |
550 <a NAME="Checker.scope" ID="Checker.scope"></a> |
443 <h4>Checker.scope</h4> |
551 <h4>Checker.scope</h4> |
444 <b>scope</b>(<i></i>) |
552 <b>scope</b>(<i></i>) |
445 |
553 |
446 <div align="right"><a href="#top">Up</a></div> |
554 <div align="right"><a href="#top">Up</a></div> |
447 <hr /><hr /> |
555 <hr /><hr /> |
|
556 <a NAME="ClassDefinition" ID="ClassDefinition"></a> |
|
557 <h2>ClassDefinition</h2> |
|
558 <p> |
|
559 Represents a class definition. |
|
560 </p> |
|
561 <h3>Derived from</h3> |
|
562 Definition |
|
563 <h3>Class Attributes</h3> |
|
564 <table> |
|
565 <tr><td>None</td></tr> |
|
566 </table> |
|
567 <h3>Class Methods</h3> |
|
568 <table> |
|
569 <tr><td>None</td></tr> |
|
570 </table> |
|
571 <h3>Methods</h3> |
|
572 <table> |
|
573 <tr><td>None</td></tr> |
|
574 </table> |
|
575 <h3>Static Methods</h3> |
|
576 <table> |
|
577 <tr><td>None</td></tr> |
|
578 </table> |
|
579 |
|
580 <div align="right"><a href="#top">Up</a></div> |
|
581 <hr /><hr /> |
448 <a NAME="ClassScope" ID="ClassScope"></a> |
582 <a NAME="ClassScope" ID="ClassScope"></a> |
449 <h2>ClassScope</h2> |
583 <h2>ClassScope</h2> |
450 <p> |
584 <p> |
451 Class representing a name scope for a class. |
585 Class representing a name scope for a class. |
452 </p> |
586 </p> |
453 <h3>Derived from</h3> |
587 <h3>Derived from</h3> |
454 Scope |
588 Scope |
|
589 <h3>Class Attributes</h3> |
|
590 <table> |
|
591 <tr><td>None</td></tr> |
|
592 </table> |
|
593 <h3>Class Methods</h3> |
|
594 <table> |
|
595 <tr><td>None</td></tr> |
|
596 </table> |
|
597 <h3>Methods</h3> |
|
598 <table> |
|
599 <tr><td>None</td></tr> |
|
600 </table> |
|
601 <h3>Static Methods</h3> |
|
602 <table> |
|
603 <tr><td>None</td></tr> |
|
604 </table> |
|
605 |
|
606 <div align="right"><a href="#top">Up</a></div> |
|
607 <hr /><hr /> |
|
608 <a NAME="Definition" ID="Definition"></a> |
|
609 <h2>Definition</h2> |
|
610 <p> |
|
611 A binding that defines a function or a class. |
|
612 </p> |
|
613 <h3>Derived from</h3> |
|
614 Binding |
455 <h3>Class Attributes</h3> |
615 <h3>Class Attributes</h3> |
456 <table> |
616 <table> |
457 <tr><td>None</td></tr> |
617 <tr><td>None</td></tr> |
458 </table> |
618 </table> |
459 <h3>Class Methods</h3> |
619 <h3>Class Methods</h3> |
646 <table> |
812 <table> |
647 <tr><td>None</td></tr> |
813 <tr><td>None</td></tr> |
648 </table> |
814 </table> |
649 <h3>Methods</h3> |
815 <h3>Methods</h3> |
650 <table> |
816 <table> |
651 <tr> |
817 <tr><td>None</td></tr> |
652 <td><a href="#Scope.__init__">Scope</a></td> |
818 </table> |
653 <td></td> |
819 <h3>Static Methods</h3> |
654 </tr><tr> |
820 <table> |
655 <td><a href="#Scope.__repr__">__repr__</a></td> |
821 <tr><td>None</td></tr> |
656 <td></td> |
822 </table> |
657 </tr> |
823 |
658 </table> |
824 <div align="right"><a href="#top">Up</a></div> |
659 <h3>Static Methods</h3> |
825 <hr /><hr /> |
660 <table> |
826 <a NAME="__init__" ID="__init__"></a> |
661 <tr><td>None</td></tr> |
827 <h2>__init__</h2> |
662 </table> |
828 <b>__init__</b>(<i>self, name, source</i>) |
663 <a NAME="Scope.__init__" ID="Scope.__init__"></a> |
829 |
664 <h4>Scope (Constructor)</h4> |
830 <div align="right"><a href="#top">Up</a></div> |
665 <b>Scope</b>(<i></i>) |
831 <hr /><hr /> |
666 <a NAME="Scope.__repr__" ID="Scope.__repr__"></a> |
832 <a NAME="__init___1" ID="__init___1"></a> |
667 <h4>Scope.__repr__</h4> |
833 <h2>__init__</h2> |
668 <b>__repr__</b>(<i></i>) |
834 <b>__init__</b>(<i>self, name, source</i>) |
669 |
835 |
670 <div align="right"><a href="#top">Up</a></div> |
836 <div align="right"><a href="#top">Up</a></div> |
671 <hr /><hr /> |
837 <hr /><hr /> |
672 <a NAME="UnBinding" ID="UnBinding"></a> |
838 <a NAME="__init___2" ID="__init___2"></a> |
673 <h2>UnBinding</h2> |
839 <h2>__init__</h2> |
674 <p> |
840 <b>__init__</b>(<i>self</i>) |
675 Created by the 'del' operator. |
841 |
676 </p> |
842 <div align="right"><a href="#top">Up</a></div> |
677 <h3>Derived from</h3> |
843 <hr /><hr /> |
678 Binding |
844 <a NAME="__repr__" ID="__repr__"></a> |
679 <h3>Class Attributes</h3> |
845 <h2>__repr__</h2> |
680 <table> |
846 <b>__repr__</b>(<i>self</i>) |
681 <tr><td>None</td></tr> |
847 |
682 </table> |
848 <div align="right"><a href="#top">Up</a></div> |
683 <h3>Class Methods</h3> |
849 <hr /><hr /> |
684 <table> |
850 <a NAME="__repr___1" ID="__repr___1"></a> |
685 <tr><td>None</td></tr> |
851 <h2>__repr__</h2> |
686 </table> |
852 <b>__repr__</b>(<i>self</i>) |
687 <h3>Methods</h3> |
853 |
688 <table> |
854 <div align="right"><a href="#top">Up</a></div> |
689 <tr><td>None</td></tr> |
855 <hr /><hr /> |
690 </table> |
856 <a NAME="__str__" ID="__str__"></a> |
691 <h3>Static Methods</h3> |
857 <h2>__str__</h2> |
692 <table> |
858 <b>__str__</b>(<i>self</i>) |
693 <tr><td>None</td></tr> |
859 |
694 </table> |
860 <div align="right"><a href="#top">Up</a></div> |
|
861 <hr /><hr /> |
|
862 <a NAME="getNodeName" ID="getNodeName"></a> |
|
863 <h2>getNodeName</h2> |
|
864 <b>getNodeName</b>(<i>node</i>) |
|
865 <p> |
|
866 Module function for getting the name of a node. |
|
867 </p> |
|
868 <div align="right"><a href="#top">Up</a></div> |
|
869 <hr /><hr /> |
|
870 <a NAME="getNodeType" ID="getNodeType"></a> |
|
871 <h2>getNodeType</h2> |
|
872 <b>getNodeType</b>(<i>node_class</i>) |
|
873 |
|
874 <div align="right"><a href="#top">Up</a></div> |
|
875 <hr /><hr /> |
|
876 <a NAME="getNodeType_1" ID="getNodeType_1"></a> |
|
877 <h2>getNodeType</h2> |
|
878 <b>getNodeType</b>(<i>node_class</i>) |
695 |
879 |
696 <div align="right"><a href="#top">Up</a></div> |
880 <div align="right"><a href="#top">Up</a></div> |
697 <hr /><hr /> |
881 <hr /><hr /> |
698 <a NAME="iter_child_nodes" ID="iter_child_nodes"></a> |
882 <a NAME="iter_child_nodes" ID="iter_child_nodes"></a> |
699 <h2>iter_child_nodes</h2> |
883 <h2>iter_child_nodes</h2> |
700 <b>iter_child_nodes</b>(<i>node, astcls=_ast.AST</i>) |
884 <b>iter_child_nodes</b>(<i>node</i>) |
701 <p> |
885 <p> |
702 Yield all direct child nodes of *node*, that is, all fields that are |
886 Yield all direct child nodes of *node*, that is, all fields that |
703 nodes and all items of fields that are lists of nodes. |
887 are nodes and all items of fields that are lists of nodes. |
|
888 </p> |
|
889 <div align="right"><a href="#top">Up</a></div> |
|
890 <hr /><hr /> |
|
891 <a NAME="names" ID="names"></a> |
|
892 <h2>names</h2> |
|
893 <b>names</b>(<i>self</i>) |
|
894 <p> |
|
895 Return a list of the names referenced by this binding. |
|
896 </p> |
|
897 <div align="right"><a href="#top">Up</a></div> |
|
898 <hr /><hr /> |
|
899 <a NAME="unusedAssignments" ID="unusedAssignments"></a> |
|
900 <h2>unusedAssignments</h2> |
|
901 <b>unusedAssignments</b>(<i>self</i>) |
|
902 <p> |
|
903 Return a generator for the assignments which have not been used. |
704 </p> |
904 </p> |
705 <div align="right"><a href="#top">Up</a></div> |
905 <div align="right"><a href="#top">Up</a></div> |
706 <hr /> |
906 <hr /> |
707 </body></html> |
907 </body></html> |