diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-05-02 23:39:55 +0300 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-05-02 23:39:55 +0300 |
commit | 351de4bd69d661f5fdd9391d94fe25e748de4322 (patch) | |
tree | f525ea5d7dca48214d3030493df3571464fb1c27 /pylint/checkers/imports.py | |
parent | 6f543650d6d0ffc53ba50a8764902e9c4930b0f9 (diff) | |
download | pylint-351de4bd69d661f5fdd9391d94fe25e748de4322.tar.gz |
Fix some typos, rename _module_hierarchy to _qualified_names.
Diffstat (limited to 'pylint/checkers/imports.py')
-rw-r--r-- | pylint/checkers/imports.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pylint/checkers/imports.py b/pylint/checkers/imports.py index 20f8db9..54c3413 100644 --- a/pylint/checkers/imports.py +++ b/pylint/checkers/imports.py @@ -293,19 +293,19 @@ given file (report RP0402 must not be disabled)'} args = repr(modname) ignored_modules = get_global_option(self, 'ignored-modules', default=[]) - for submodule in self._module_hierarchy(modname): + for submodule in self._qualified_names(modname): if submodule in ignored_modules: return None if not _except_import_error(importnode.parent): self.add_message("import-error", args=args, node=importnode) - def _module_hierarchy(self, modname): - """Returns a list representing the module heirarchy, where each element - is the fullly qualified name of the parent of the next element. + @staticmethod + def _qualified_names(modname): + """Split the names of the given module into subparts For example, - _module_hierarchy('pylint.checkers.ImportsChecker') + _qualified_names('pylint.checkers.ImportsChecker') returns ['pylint', 'pylint.checkers', 'pylint.checkers.ImportsChecker'] """ |