#NEWLINE# @ property_depends_on ( 'root, recursive, file_type' ) #NEWLINE# def _get_source_files( self ) : #NEWLINE# #INDENT# root = self . root #NEWLINE# if ( root == '' ) : #NEWLINE# #INDENT# root = getcwd ( ) #NEWLINE# #UNINDENT# file_types = FileTypes [ self . file_type ] #NEWLINE# if self . recursive : #NEWLINE# #INDENT# result = [ ] #NEWLINE# for ( dir_path , dir_names , file_names ) in walk ( root ) : #NEWLINE# #INDENT# for file_name in file_names : #NEWLINE# #INDENT# if ( splitext ( file_name ) [ 1 ] in file_types ) : #NEWLINE# #INDENT# result . append ( SourceFile ( live_search = self , full_name = join ( dir_path , file_name ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return result #NEWLINE# #UNINDENT# return [ SourceFile ( live_search = self , full_name = join ( root , file_name ) ) for file_name in listdir ( root ) if ( splitext ( file_name ) [ 1 ] in file_types ) ]