#NEWLINE# @ classmethod #NEWLINE# def get_new_file_ext( cls , view , file_path = None ) : #NEWLINE# #INDENT# 'Returns a tuple in style (str(ext), bool(prepend_ext)).\n\n        The first part is the extension string, which may be ``None``.\n        The second part is a boolean value that indicates whether the dumper\n        (or the handler) should use the value of the first part as appendix\n        and prepend the actual "new" file type.\n\n        See also get_ext_appendix().\n        ' #NEWLINE# file_path = ( file_path or ( view and view . file_name ( ) ) ) #NEWLINE# if ( not file_path ) : #NEWLINE# #INDENT# return ( None , False ) #NEWLINE# #UNINDENT# appendix = cls . get_ext_appendix ( file_path ) #NEWLINE# if appendix : #NEWLINE# #INDENT# return ( ( '.' + appendix ) , False ) #NEWLINE# #UNINDENT# ext = os . path . splitext ( file_path ) [ 1 ] #NEWLINE# if ( ( not ( view == ( '.' + cls . ext ) ) ) and cls . file_is_valid ( view , file_path ) ) : #NEWLINE# #INDENT# return ( ext , True ) #NEWLINE# #UNINDENT# return ( None , False )