def load_configs(configs):

    configdict = {}

    # rewrite this...
    for config in configs:
        fName, fExt = os.path.splitext(config)
        conf = kaptan.Kaptan(handler=fExt.lstrip('.'))
        conf.import_config(config)

        newconfigdict = expand_config(conf.export('dict'))

        if configdict:
            for path in newconfigdict:
                if path in configdict:
                    for repo_name in newconfigdict[path]:
                        if repo_name in configdict[path]:
                            if newconfigdict[path][repo_name] != configdict[path][repo_name]:
                                print('same path + repo for %s' % repo_name)
                                if newconfigdict[path][repo_name]['repo'] != configdict[path][repo_name]['repo']:
                                    msg = (
                                        'same path + repo, different vcs (%s)\n'
                                        '%s\n%s' %
                                        (
                                            repo_name,
                                            configdict[path][repo_name]['repo'],
                                            newconfigdict[path][repo_name]['repo']
                                        )
                                    )
                                    raise Exception(msg)
        configdict = update_dict(configdict, newconfigdict)
        # configdict.update(conf.export('dict'))

    # if configs load and validate_schema, then load.
    # configs = [config for config in configs if validate_schema(config)]

    configdict = expand_config(configdict)

    return configdict
Return repos from a directory and fnmatch. Not recursive.
dataset/ETHPy150Open tony/vcspull/vcspull/config.py/load_configs