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. |
__checkLocalImports | Private method to check local imports. |
__checkUnnecessaryAlias | Private method to check unnecessary import aliases. |
__compileUnstructuredGlob | Private method to convert a pattern to a regex such that ".*" matches zero or more modules. |
__error | Private method to record an issue. |
__ignoreCode | Private method to check if the message code should be ignored. |
__isModuleBanned | Private method to check, if the given module name banned. |
__tidyImports | Private method to check various other import related topics. |
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 local imports.
Private method to check unnecessary import aliases.
Private method to convert a pattern to a regex such that ".*" matches zero or more modules.
Private method to record an issue.
Private method to check if the message code should be ignored.
Private method to check, if the given module name banned.
Private method to check various other import related topics.
Public method to check the given source against miscellaneous conditions.