#NEWLINE# def expand_config( config ) : #NEWLINE# #INDENT# 'Return expanded configuration.\n\n    end-user configuration permit inline configuration shortcuts, expand to\n    identical format for parsing.\n\n    :param config: the repo config in :py:class:`dict` format.\n    :type config: dict\n    :rtype: dict\n\n    ' #NEWLINE# for ( directory , repos ) in config . items ( ) : #NEWLINE# #INDENT# for ( repo , repo_data ) in repos . items ( ) : #NEWLINE# #INDENT# "\n            repo_name: http://myrepo.com/repo.git\n\n            to\n\n            repo_name: { repo: 'http://myrepo.com/repo.git' }\n\n            also assures the repo is a :py:class:`dict`.\n            " #NEWLINE# if isinstance ( repo_data , string_types ) : #NEWLINE# #INDENT# config [ directory ] [ repo ] = { #NEWLINE# #INDENT# 'repo' : repo_data , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# '\n            ``shell_command_after``: if str, turn to list.\n            ' #NEWLINE# if ( 'shell_command_after' in repo_data ) : #NEWLINE# #INDENT# if isinstance ( repo_data [ 'shell_command_after' ] , string_types ) : #NEWLINE# #INDENT# repo_data [ 'shell_command_after' ] = [ repo_data [ 'shell_command_after' ] ] #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# config = dict ( ( ( os . path . expandvars ( directory ) , repo_data ) for ( directory , repo_data ) in config . items ( ) ) ) #NEWLINE# config = dict ( ( ( os . path . expanduser ( directory ) , repo_data ) for ( directory , repo_data ) in config . items ( ) ) ) #NEWLINE# return config