Backward compatibility is preserved.
- Group Reviewers
- rDSTOe59eb389846f: Make Storage.origin_get support a list of origins, like other Storage.*_get…
Apart a couple of nitpicks, looks good to me.
I think once this is landed, we should create a task to track the calls of origin_get using the old API in all swh modules and port them to the new one.
Once it is done, the return_single switches should be removed from the origin_get method implementation.
The method description should be updated to inform that multiple origins can be passed as parameter now.
That else block could be removed by initializing return_single to False before the dict check
I think that test can be removed, None will be returned with or without it
Method description needs update here too
same remark as above: else block could be removed
I know None is returned by default when return is not called but I think that expression is clearer
return results if results['id'] is not None else None
origin_id seems a better variable name here
Build has FAILED
Link to build: https://jenkins.softwareheritage.org/job/DSTO/job/tox/179/
See console output for more information: https://jenkins.softwareheritage.org/job/DSTO/job/tox/179/console