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.Imports.LocalImportVisitor</h1> |
9 <h1>eric7.Plugins.CheckerPlugins.CodeStyleChecker.Imports.LocalImportVisitor</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing a node visitor for checking local import statements. |
11 Module implementing a node visitor for checking local import statements. |
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="#LocalImportVisitor">LocalImportVisitor</a></td> |
22 <td><a href="#LocalImportVisitor">LocalImportVisitor</a></td> |
25 <td>Class implementing a node visitor for checking local import statements.</td> |
23 <td>Class implementing a node visitor for checking local import statements.</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="LocalImportVisitor" ID="LocalImportVisitor"></a> |
34 <a NAME="LocalImportVisitor" ID="LocalImportVisitor"></a> |
36 <h2>LocalImportVisitor</h2> |
35 <h2>LocalImportVisitor</h2> |
37 |
|
38 <p> |
36 <p> |
39 Class implementing a node visitor for checking local import statements. |
37 Class implementing a node visitor for checking local import statements. |
40 </p> |
38 </p> |
|
39 |
41 <h3>Derived from</h3> |
40 <h3>Derived from</h3> |
42 ast.NodeVisitor |
41 ast.NodeVisitor |
43 <h3>Class Attributes</h3> |
42 <h3>Class Attributes</h3> |
44 |
|
45 <table> |
43 <table> |
46 <tr><td>None</td></tr> |
44 <tr><td>None</td></tr> |
47 </table> |
45 </table> |
|
46 |
48 <h3>Class Methods</h3> |
47 <h3>Class Methods</h3> |
49 |
|
50 <table> |
48 <table> |
51 <tr><td>None</td></tr> |
49 <tr><td>None</td></tr> |
52 </table> |
50 </table> |
|
51 |
53 <h3>Methods</h3> |
52 <h3>Methods</h3> |
54 |
|
55 <table> |
53 <table> |
56 |
|
57 <tr> |
54 <tr> |
58 <td><a href="#LocalImportVisitor.__init__">LocalImportVisitor</a></td> |
55 <td><a href="#LocalImportVisitor.__init__">LocalImportVisitor</a></td> |
59 <td>Constructor</td> |
56 <td>Constructor</td> |
60 </tr> |
57 </tr> |
61 <tr> |
58 <tr> |
81 <tr> |
78 <tr> |
82 <td><a href="#LocalImportVisitor.visit_ImportFrom">visit_ImportFrom</a></td> |
79 <td><a href="#LocalImportVisitor.visit_ImportFrom">visit_ImportFrom</a></td> |
83 <td>Public method to handle an import from statement.</td> |
80 <td>Public method to handle an import from statement.</td> |
84 </tr> |
81 </tr> |
85 </table> |
82 </table> |
|
83 |
86 <h3>Static Methods</h3> |
84 <h3>Static Methods</h3> |
87 |
|
88 <table> |
85 <table> |
89 <tr><td>None</td></tr> |
86 <tr><td>None</td></tr> |
90 </table> |
87 </table> |
91 |
88 |
|
89 |
92 <a NAME="LocalImportVisitor.__init__" ID="LocalImportVisitor.__init__"></a> |
90 <a NAME="LocalImportVisitor.__init__" ID="LocalImportVisitor.__init__"></a> |
93 <h4>LocalImportVisitor (Constructor)</h4> |
91 <h4>LocalImportVisitor (Constructor)</h4> |
94 <b>LocalImportVisitor</b>(<i>args, checker</i>) |
92 <b>LocalImportVisitor</b>(<i>args, checker</i>) |
95 |
|
96 <p> |
93 <p> |
97 Constructor |
94 Constructor |
98 </p> |
95 </p> |
|
96 |
99 <dl> |
97 <dl> |
100 |
98 |
101 <dt><i>args</i> (dict)</dt> |
99 <dt><i>args</i> (dict)</dt> |
102 <dd> |
100 <dd> |
103 dictionary containing the checker arguments |
101 dictionary containing the checker arguments |
108 </dd> |
106 </dd> |
109 </dl> |
107 </dl> |
110 <a NAME="LocalImportVisitor.__assertExternalModule" ID="LocalImportVisitor.__assertExternalModule"></a> |
108 <a NAME="LocalImportVisitor.__assertExternalModule" ID="LocalImportVisitor.__assertExternalModule"></a> |
111 <h4>LocalImportVisitor.__assertExternalModule</h4> |
109 <h4>LocalImportVisitor.__assertExternalModule</h4> |
112 <b>__assertExternalModule</b>(<i>node, module</i>) |
110 <b>__assertExternalModule</b>(<i>node, module</i>) |
113 |
|
114 <p> |
111 <p> |
115 Private method to assert the given node. |
112 Private method to assert the given node. |
116 </p> |
113 </p> |
|
114 |
117 <dl> |
115 <dl> |
118 |
116 |
119 <dt><i>node</i> (ast.stmt)</dt> |
117 <dt><i>node</i> (ast.stmt)</dt> |
120 <dd> |
118 <dd> |
121 reference to the node to be processed |
119 reference to the node to be processed |
126 </dd> |
124 </dd> |
127 </dl> |
125 </dl> |
128 <a NAME="LocalImportVisitor.__visitImportNode" ID="LocalImportVisitor.__visitImportNode"></a> |
126 <a NAME="LocalImportVisitor.__visitImportNode" ID="LocalImportVisitor.__visitImportNode"></a> |
129 <h4>LocalImportVisitor.__visitImportNode</h4> |
127 <h4>LocalImportVisitor.__visitImportNode</h4> |
130 <b>__visitImportNode</b>(<i>node</i>) |
128 <b>__visitImportNode</b>(<i>node</i>) |
131 |
|
132 <p> |
129 <p> |
133 Private method to handle an import or import from statement. |
130 Private method to handle an import or import from statement. |
134 </p> |
131 </p> |
|
132 |
135 <dl> |
133 <dl> |
136 |
134 |
137 <dt><i>node</i> (ast.Import or ast.ImportFrom)</dt> |
135 <dt><i>node</i> (ast.Import or ast.ImportFrom)</dt> |
138 <dd> |
136 <dd> |
139 reference to the node to be processed |
137 reference to the node to be processed |
140 </dd> |
138 </dd> |
141 </dl> |
139 </dl> |
142 <a NAME="LocalImportVisitor.visit" ID="LocalImportVisitor.visit"></a> |
140 <a NAME="LocalImportVisitor.visit" ID="LocalImportVisitor.visit"></a> |
143 <h4>LocalImportVisitor.visit</h4> |
141 <h4>LocalImportVisitor.visit</h4> |
144 <b>visit</b>(<i>node</i>) |
142 <b>visit</b>(<i>node</i>) |
145 |
|
146 <p> |
143 <p> |
147 Public method to traverse the tree of an AST node. |
144 Public method to traverse the tree of an AST node. |
148 </p> |
145 </p> |
|
146 |
149 <dl> |
147 <dl> |
150 |
148 |
151 <dt><i>node</i> (ast.AST)</dt> |
149 <dt><i>node</i> (ast.AST)</dt> |
152 <dd> |
150 <dd> |
153 AST node to parse |
151 AST node to parse |
154 </dd> |
152 </dd> |
155 </dl> |
153 </dl> |
156 <a NAME="LocalImportVisitor.visit_FunctionDef" ID="LocalImportVisitor.visit_FunctionDef"></a> |
154 <a NAME="LocalImportVisitor.visit_FunctionDef" ID="LocalImportVisitor.visit_FunctionDef"></a> |
157 <h4>LocalImportVisitor.visit_FunctionDef</h4> |
155 <h4>LocalImportVisitor.visit_FunctionDef</h4> |
158 <b>visit_FunctionDef</b>(<i>node</i>) |
156 <b>visit_FunctionDef</b>(<i>node</i>) |
159 |
|
160 <p> |
157 <p> |
161 Public method to handle a function definition. |
158 Public method to handle a function definition. |
162 </p> |
159 </p> |
|
160 |
163 <dl> |
161 <dl> |
164 |
162 |
165 <dt><i>node</i> (ast.FunctionDef)</dt> |
163 <dt><i>node</i> (ast.FunctionDef)</dt> |
166 <dd> |
164 <dd> |
167 reference to the node to be processed |
165 reference to the node to be processed |
168 </dd> |
166 </dd> |
169 </dl> |
167 </dl> |
170 <a NAME="LocalImportVisitor.visit_Import" ID="LocalImportVisitor.visit_Import"></a> |
168 <a NAME="LocalImportVisitor.visit_Import" ID="LocalImportVisitor.visit_Import"></a> |
171 <h4>LocalImportVisitor.visit_Import</h4> |
169 <h4>LocalImportVisitor.visit_Import</h4> |
172 <b>visit_Import</b>(<i>node</i>) |
170 <b>visit_Import</b>(<i>node</i>) |
173 |
|
174 <p> |
171 <p> |
175 Public method to handle an import statement. |
172 Public method to handle an import statement. |
176 </p> |
173 </p> |
|
174 |
177 <dl> |
175 <dl> |
178 |
176 |
179 <dt><i>node</i> (ast.Import)</dt> |
177 <dt><i>node</i> (ast.Import)</dt> |
180 <dd> |
178 <dd> |
181 reference to the node to be processed |
179 reference to the node to be processed |
182 </dd> |
180 </dd> |
183 </dl> |
181 </dl> |
184 <a NAME="LocalImportVisitor.visit_ImportFrom" ID="LocalImportVisitor.visit_ImportFrom"></a> |
182 <a NAME="LocalImportVisitor.visit_ImportFrom" ID="LocalImportVisitor.visit_ImportFrom"></a> |
185 <h4>LocalImportVisitor.visit_ImportFrom</h4> |
183 <h4>LocalImportVisitor.visit_ImportFrom</h4> |
186 <b>visit_ImportFrom</b>(<i>node</i>) |
184 <b>visit_ImportFrom</b>(<i>node</i>) |
187 |
|
188 <p> |
185 <p> |
189 Public method to handle an import from statement. |
186 Public method to handle an import from statement. |
190 </p> |
187 </p> |
|
188 |
191 <dl> |
189 <dl> |
192 |
190 |
193 <dt><i>node</i> (ast.ImportFrom)</dt> |
191 <dt><i>node</i> (ast.ImportFrom)</dt> |
194 <dd> |
192 <dd> |
195 reference to the node to be processed |
193 reference to the node to be processed |