#NEWLINE# def only_for_dart_files( func ) : #NEWLINE# #INDENT# @ wraps ( func ) #NEWLINE# def inner( self , view ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# fname = view . file_name ( ) #NEWLINE# if ( fname and is_dart_script ( fname ) ) : #NEWLINE# #INDENT# return func ( self , view ) #NEWLINE# #UNINDENT# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# assert ( view is None ) , 'wrong usage' #NEWLINE# #UNINDENT# #UNINDENT# return inner