From 7a2ea6f366594dbb0425aabe22e6f7bec8f20e5b Mon Sep 17 00:00:00 2001 From: mprahl Date: Oct 16 2018 13:32:50 +0000 Subject: Correct the docstrings for resolve_requires --- diff --git a/module_build_service/resolver/DBResolver.py b/module_build_service/resolver/DBResolver.py index c6651d7..1cd4221 100644 --- a/module_build_service/resolver/DBResolver.py +++ b/module_build_service/resolver/DBResolver.py @@ -175,7 +175,7 @@ class DBResolver(GenericResolver): If there are some modules loaded by utils.load_local_builds(...), these local modules will be considered when resolving the requires. A RuntimeError is raised on DB lookup errors. - :param requires: a dictionary with the module name as the key and the stream as the value + :param requires: a list of N:S or N:S:V:C strings :return: a dictionary """ new_requires = {} diff --git a/module_build_service/resolver/MBSResolver.py b/module_build_service/resolver/MBSResolver.py index 4b46850..9d26862 100644 --- a/module_build_service/resolver/MBSResolver.py +++ b/module_build_service/resolver/MBSResolver.py @@ -272,23 +272,14 @@ class MBSResolver(GenericResolver): def resolve_requires(self, requires): """ - Takes `requires` dict with module_name as key and module_stream as value. - Resolves the stream to particular latest version of a module and returns - new dict in following format: - - { - "module_name": { - "ref": module_commit_hash, - "stream": original_module_stream, - "version": module_version - }, - ... - } - + Resolves the requires list of N:S or N:S:V:C to a dictionary with keys as + the module name and the values as a dictionary with keys of ref, + stream, version. If there are some modules loaded by utils.load_local_builds(...), these - local modules will be considered when resolving the requires. - - Raises RuntimeError on MBS lookup error. + local modules will be considered when resolving the requires. A RuntimeError + is raised on MBS lookup errors. + :param requires: a list of N:S or N:S:V:C strings + :return: a dictionary """ new_requires = {} for nsvc in requires: