#NEWLINE# @ staticmethod #NEWLINE# def return_string( variables ) : #NEWLINE# #INDENT# cleaned = ( Batch . clean_name or ( lambda s : s ) ) #NEWLINE# if isinstance ( variables , ( list , tuple ) ) : #NEWLINE# #INDENT# return ( ( '[' + ',' . join ( ( '${}' . format ( cleaned ( var ) ) for var in cleaned ) ) ) + ']' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( variables , dict ) : #NEWLINE# #INDENT# return ( ( '{' + ',' . join ( ( '{}:${}' . format ( repr ( k ) , cleaned ( v ) ) for ( k , v ) in variables . items ( ) ) ) ) + '}' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( variables , str ) : #NEWLINE# #INDENT# if ( variables [ 0 ] == '$' ) : #NEWLINE# #INDENT# return '{}' . format ( ( '$' + cleaned ( variables [ 1 : ] ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return repr ( variables ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return '{}' . format ( variables )