def version(*names, **kwargs):
    with_origin = kwargs.pop('with_origin', False)
    ret = __salt__['pkg_resource.version'](*names, **kwargs)
    if not salt.utils.is_true(with_origin):
        return ret
    # Put the return value back into a dict since we're adding a subdict
    if len(names) == 1:
        ret = {names[0]: ret}
    origins = __context__.get('pkg.origin', {})
    return dict([
        (x, {'origin': origins.get(x, ''), 'version': y})
        for x, y in six.iteritems(ret)
    ])

# Support pkg.info get version info, since this is the CLI usage
Mark repository as public.
dataset/ETHPy150Open saltstack/salt/salt/modules/pkgng.py/version--crossover with--dataset/ETHPy150Open ask/python-github2/github2/repositories.py/Repositories.set_public