#NEWLINE# def get_source_folders( self , file_path = None , as_tuple = False , include_missing = False ) : #NEWLINE# #INDENT# '\n        Returns a list of folders which specified as a source folder,\n            otherwise, returns a project folders\n\n        @param file_path: a file path\n        @param as_tuple: a boolean specified whether the result will be\n            returned as a tuple of (folder path, from global) or not\n        @param include_missing: a boolean specified whether returns a list\n            with missing source folders or not\n        ' #NEWLINE# source_folders = [ source_folder for source_folder in Settings ( ) . get ( 'source_folders' , [ ] ) if ( os . path . exists ( source_folder ) or include_missing ) ] #NEWLINE# if as_tuple : #NEWLINE# #INDENT# if source_folders : #NEWLINE# #INDENT# return ( source_folders , True ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( self . get_project_dirs ( file_path = file_path ) , False ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return ( file_path or self . get_project_dirs ( file_path = file_path ) )