Module implementing a checker for import statements.
None |
ImportsChecker | Class implementing a checker for import statements. |
None |
Class implementing a checker for import statements.
Codes |
None |
ImportsChecker | Constructor |
__checkBannedImport | Private method to check import of banned modules. |
__checkBannedRelativeImports | Private method to check if relative imports are banned. |
__checkImportOrder | Private method to check the order of import statements. |
__checkLocalImports | Private method to check local imports. |
__checkUnnecessaryAlias | Private method to check unnecessary import aliases. |
__error | Private method to record an issue. |
__findErrorInAll | Private method to check the '__all__' node for errors. |
__findNodes | Private method to find all import and import from nodes of the given tree. |
__ignoreCode | Private method to check if the message code should be ignored. |
__tidyImports | Private method to check various other import related topics. |
getStandardModules | Public method to get a list of modules of the standard library. |
run | Public method to check the given source against miscellaneous conditions. |
None |
Constructor
Private method to check import of banned modules.
Private method to check if relative imports are banned.
Private method to check the order of import statements.
Private method to check local imports.
Private method to check unnecessary import aliases.
Private method to record an issue.
Private method to check the '__all__' node for errors.
Private method to find all import and import from nodes of the given tree.
Private method to check if the message code should be ignored.
Private method to check various other import related topics.
Public method to get a list of modules of the standard library.
Public method to check the given source against miscellaneous conditions.