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

branch
eric7
changeset 9209
b99e7fd55fd3
parent 8877
548d45c3f571
child 10479
856476537696
equal deleted inserted replaced
9208:3fc8dfeb6ebe 9209:b99e7fd55fd3
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Imports.LocalImportVisitor</title>
4 <meta charset="UTF-8">
5 <link rel="stylesheet" href="styles.css">
6 </head>
7 <body>
8 <a NAME="top" ID="top"></a>
9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Imports.LocalImportVisitor</h1>
10
11 <p>
12 Module implementing a node visitor for checking local import statements.
13 </p>
14 <h3>Global Attributes</h3>
15
16 <table>
17 <tr><td>None</td></tr>
18 </table>
19 <h3>Classes</h3>
20
21 <table>
22
23 <tr>
24 <td><a href="#LocalImportVisitor">LocalImportVisitor</a></td>
25 <td>Class implementing a node visitor for checking local import statements.</td>
26 </tr>
27 </table>
28 <h3>Functions</h3>
29
30 <table>
31 <tr><td>None</td></tr>
32 </table>
33 <hr />
34 <hr />
35 <a NAME="LocalImportVisitor" ID="LocalImportVisitor"></a>
36 <h2>LocalImportVisitor</h2>
37
38 <p>
39 Class implementing a node visitor for checking local import statements.
40 </p>
41 <h3>Derived from</h3>
42 ast.NodeVisitor
43 <h3>Class Attributes</h3>
44
45 <table>
46 <tr><td>None</td></tr>
47 </table>
48 <h3>Class Methods</h3>
49
50 <table>
51 <tr><td>None</td></tr>
52 </table>
53 <h3>Methods</h3>
54
55 <table>
56
57 <tr>
58 <td><a href="#LocalImportVisitor.__init__">LocalImportVisitor</a></td>
59 <td>Constructor</td>
60 </tr>
61 <tr>
62 <td><a href="#LocalImportVisitor.__assertExternalModule">__assertExternalModule</a></td>
63 <td>Private method to assert the given node.</td>
64 </tr>
65 <tr>
66 <td><a href="#LocalImportVisitor.__visitImportNode">__visitImportNode</a></td>
67 <td>Private method to handle an import or import from statement.</td>
68 </tr>
69 <tr>
70 <td><a href="#LocalImportVisitor.visit">visit</a></td>
71 <td>Public method to traverse the tree of an AST node.</td>
72 </tr>
73 <tr>
74 <td><a href="#LocalImportVisitor.visit_FunctionDef">visit_FunctionDef</a></td>
75 <td>Public method to handle a function definition.</td>
76 </tr>
77 <tr>
78 <td><a href="#LocalImportVisitor.visit_Import">visit_Import</a></td>
79 <td>Public method to handle an import statement.</td>
80 </tr>
81 <tr>
82 <td><a href="#LocalImportVisitor.visit_ImportFrom">visit_ImportFrom</a></td>
83 <td>Public method to handle an import from statement.</td>
84 </tr>
85 </table>
86 <h3>Static Methods</h3>
87
88 <table>
89 <tr><td>None</td></tr>
90 </table>
91
92 <a NAME="LocalImportVisitor.__init__" ID="LocalImportVisitor.__init__"></a>
93 <h4>LocalImportVisitor (Constructor)</h4>
94 <b>LocalImportVisitor</b>(<i>args, checker</i>)
95
96 <p>
97 Constructor
98 </p>
99 <dl>
100
101 <dt><i>args</i> (dict)</dt>
102 <dd>
103 dictionary containing the checker arguments
104 </dd>
105 <dt><i>checker</i> (ImportsChecker)</dt>
106 <dd>
107 reference to the checker
108 </dd>
109 </dl>
110 <a NAME="LocalImportVisitor.__assertExternalModule" ID="LocalImportVisitor.__assertExternalModule"></a>
111 <h4>LocalImportVisitor.__assertExternalModule</h4>
112 <b>__assertExternalModule</b>(<i>node, module</i>)
113
114 <p>
115 Private method to assert the given node.
116 </p>
117 <dl>
118
119 <dt><i>node</i> (ast.stmt)</dt>
120 <dd>
121 reference to the node to be processed
122 </dd>
123 <dt><i>module</i> (str)</dt>
124 <dd>
125 name of the module
126 </dd>
127 </dl>
128 <a NAME="LocalImportVisitor.__visitImportNode" ID="LocalImportVisitor.__visitImportNode"></a>
129 <h4>LocalImportVisitor.__visitImportNode</h4>
130 <b>__visitImportNode</b>(<i>node</i>)
131
132 <p>
133 Private method to handle an import or import from statement.
134 </p>
135 <dl>
136
137 <dt><i>node</i> (ast.Import or ast.ImportFrom)</dt>
138 <dd>
139 reference to the node to be processed
140 </dd>
141 </dl>
142 <a NAME="LocalImportVisitor.visit" ID="LocalImportVisitor.visit"></a>
143 <h4>LocalImportVisitor.visit</h4>
144 <b>visit</b>(<i>node</i>)
145
146 <p>
147 Public method to traverse the tree of an AST node.
148 </p>
149 <dl>
150
151 <dt><i>node</i> (ast.AST)</dt>
152 <dd>
153 AST node to parse
154 </dd>
155 </dl>
156 <a NAME="LocalImportVisitor.visit_FunctionDef" ID="LocalImportVisitor.visit_FunctionDef"></a>
157 <h4>LocalImportVisitor.visit_FunctionDef</h4>
158 <b>visit_FunctionDef</b>(<i>node</i>)
159
160 <p>
161 Public method to handle a function definition.
162 </p>
163 <dl>
164
165 <dt><i>node</i> (ast.FunctionDef)</dt>
166 <dd>
167 reference to the node to be processed
168 </dd>
169 </dl>
170 <a NAME="LocalImportVisitor.visit_Import" ID="LocalImportVisitor.visit_Import"></a>
171 <h4>LocalImportVisitor.visit_Import</h4>
172 <b>visit_Import</b>(<i>node</i>)
173
174 <p>
175 Public method to handle an import statement.
176 </p>
177 <dl>
178
179 <dt><i>node</i> (ast.Import)</dt>
180 <dd>
181 reference to the node to be processed
182 </dd>
183 </dl>
184 <a NAME="LocalImportVisitor.visit_ImportFrom" ID="LocalImportVisitor.visit_ImportFrom"></a>
185 <h4>LocalImportVisitor.visit_ImportFrom</h4>
186 <b>visit_ImportFrom</b>(<i>node</i>)
187
188 <p>
189 Public method to handle an import from statement.
190 </p>
191 <dl>
192
193 <dt><i>node</i> (ast.ImportFrom)</dt>
194 <dd>
195 reference to the node to be processed
196 </dd>
197 </dl>
198 <div align="right"><a href="#top">Up</a></div>
199 <hr />
200 </body></html>

eric ide

mercurial