74 <tr> |
75 <tr> |
75 <td><a href="#ImportsChecker.__compileUnstructuredGlob">__compileUnstructuredGlob</a></td> |
76 <td><a href="#ImportsChecker.__compileUnstructuredGlob">__compileUnstructuredGlob</a></td> |
76 <td>Private method to convert a pattern to a regex such that ".*" matches zero or more modules.</td> |
77 <td>Private method to convert a pattern to a regex such that ".*" matches zero or more modules.</td> |
77 </tr> |
78 </tr> |
78 <tr> |
79 <tr> |
79 <td><a href="#ImportsChecker.__error">__error</a></td> |
|
80 <td>Private method to record an issue.</td> |
|
81 </tr> |
|
82 <tr> |
|
83 <td><a href="#ImportsChecker.__ignoreCode">__ignoreCode</a></td> |
|
84 <td>Private method to check if the message code should be ignored.</td> |
|
85 </tr> |
|
86 <tr> |
|
87 <td><a href="#ImportsChecker.__isModuleBanned">__isModuleBanned</a></td> |
80 <td><a href="#ImportsChecker.__isModuleBanned">__isModuleBanned</a></td> |
88 <td>Private method to check, if the given module name banned.</td> |
81 <td>Private method to check, if the given module name banned.</td> |
89 </tr> |
82 </tr> |
90 <tr> |
83 <tr> |
91 <td><a href="#ImportsChecker.__tidyImports">__tidyImports</a></td> |
84 <td><a href="#ImportsChecker.__tidyImports">__tidyImports</a></td> |
92 <td>Private method to check various other import related topics.</td> |
85 <td>Private method to check various other import related topics.</td> |
93 </tr> |
|
94 <tr> |
|
95 <td><a href="#ImportsChecker.run">run</a></td> |
|
96 <td>Public method to check the given source against miscellaneous conditions.</td> |
|
97 </tr> |
86 </tr> |
98 </table> |
87 </table> |
99 |
88 |
100 <h3>Static Methods</h3> |
89 <h3>Static Methods</h3> |
101 <table> |
90 <table> |
219 <dt>Return Type:</dt> |
208 <dt>Return Type:</dt> |
220 <dd> |
209 <dd> |
221 re.regex object |
210 re.regex object |
222 </dd> |
211 </dd> |
223 </dl> |
212 </dl> |
224 <a NAME="ImportsChecker.__error" ID="ImportsChecker.__error"></a> |
|
225 <h4>ImportsChecker.__error</h4> |
|
226 <b>__error</b>(<i>lineNumber, offset, code, *args</i>) |
|
227 <p> |
|
228 Private method to record an issue. |
|
229 </p> |
|
230 |
|
231 <dl> |
|
232 |
|
233 <dt><i>lineNumber</i> (int)</dt> |
|
234 <dd> |
|
235 line number of the issue |
|
236 </dd> |
|
237 <dt><i>offset</i> (int)</dt> |
|
238 <dd> |
|
239 position within line of the issue |
|
240 </dd> |
|
241 <dt><i>code</i> (str)</dt> |
|
242 <dd> |
|
243 message code |
|
244 </dd> |
|
245 <dt><i>args</i> (list)</dt> |
|
246 <dd> |
|
247 arguments for the message |
|
248 </dd> |
|
249 </dl> |
|
250 <a NAME="ImportsChecker.__ignoreCode" ID="ImportsChecker.__ignoreCode"></a> |
|
251 <h4>ImportsChecker.__ignoreCode</h4> |
|
252 <b>__ignoreCode</b>(<i>code</i>) |
|
253 <p> |
|
254 Private method to check if the message code should be ignored. |
|
255 </p> |
|
256 |
|
257 <dl> |
|
258 |
|
259 <dt><i>code</i> (str)</dt> |
|
260 <dd> |
|
261 message code to check for |
|
262 </dd> |
|
263 </dl> |
|
264 <dl> |
|
265 <dt>Return:</dt> |
|
266 <dd> |
|
267 flag indicating to ignore the given code |
|
268 </dd> |
|
269 </dl> |
|
270 <dl> |
|
271 <dt>Return Type:</dt> |
|
272 <dd> |
|
273 bool |
|
274 </dd> |
|
275 </dl> |
|
276 <a NAME="ImportsChecker.__isModuleBanned" ID="ImportsChecker.__isModuleBanned"></a> |
213 <a NAME="ImportsChecker.__isModuleBanned" ID="ImportsChecker.__isModuleBanned"></a> |
277 <h4>ImportsChecker.__isModuleBanned</h4> |
214 <h4>ImportsChecker.__isModuleBanned</h4> |
278 <b>__isModuleBanned</b>(<i>moduleName</i>) |
215 <b>__isModuleBanned</b>(<i>moduleName</i>) |
279 <p> |
216 <p> |
280 Private method to check, if the given module name banned. |
217 Private method to check, if the given module name banned. |