From 351de4bd69d661f5fdd9391d94fe25e748de4322 Mon Sep 17 00:00:00 2001 From: Claudiu Popa Date: Sat, 2 May 2015 23:39:55 +0300 Subject: Fix some typos, rename _module_hierarchy to _qualified_names. --- pylint/checkers/imports.py | 10 +++++----- 1 file 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'] """ -- cgit v1.2.1