assapin commented on a change in pull request #4: URL: https://github.com/apache/incubator-liminal/pull/4#discussion_r516923467
########## File path: liminal/core/util/class_util.py ########## @@ -46,20 +46,26 @@ def find_subclasses_in_packages(packages, parent_class): return result -def import_module(package, recrsive=True): - """ Import all submodules of a module, recursively, including subpackages +def import_module(package, recursive=True): + """ + Import all submodules of a module + :param package: package (name or actual module) :type package: str | module :rtype: dict[str, types.ModuleType] + + :param recursive: search recursively (default: True) + :type recursive: bool """ if isinstance(package, str): package = importlib.import_module(package) results = {} for loader, name, is_pkg in pkgutil.walk_packages(package.__path__): full_name = package.__name__ + '.' + name - results[full_name] = importlib.import_module(full_name) - if recrsive and is_pkg: - results.update(import_module(full_name)) + if not name == 'liminal_python_server': Review comment: why is this line needed? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org