def expand_config(config):
    for directory, repos in config.items():
        for repo, repo_data in repos.items():

            '''
            repo_name: http://myrepo.com/repo.git

            to

            repo_name: { repo: 'http://myrepo.com/repo.git' }

            also assures the repo is a :py:class:`dict`.
            '''

            if isinstance(repo_data, string_types):
                config[directory][repo] = {'repo': repo_data}

            '''
            ``shell_command_after``: if str, turn to list.
            '''
            if 'shell_command_after' in repo_data:
                if isinstance(repo_data['shell_command_after'], string_types):
                    repo_data['shell_command_after'] = [
                        repo_data['shell_command_after']
                    ]

    config = dict(
        (os.path.expandvars(directory), repo_data)
        for directory, repo_data in config.items()
    )

    config = dict(
        (os.path.expanduser(directory), repo_data) for
        directory, repo_data in config.items()
    )

    return config
Returns the number of interior rings.
dataset/ETHPy150Open tony/vcspull/vcspull/config.py/expand_config--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.2/django/contrib/gis/geos/polygon.py/Polygon.num_interior_rings