def prune(self):
def to_include(obj):<EOL><INDENT>inc = obj.permission in self.display<EOL>if self.settings['<STR_LIT>'].lower() == '<STR_LIT:true>' and not obj.doc:<EOL><INDENT>inc = False<EOL><DEDENT>return inc<EOL><DEDENT>if self.obj == '<STR_LIT>' and self.meta['<STR_LIT>'] == '<STR_LIT:false>':<EOL><INDENT>self.functions = []<EOL>self.subroutines = []<EOL>self.types = []<EOL>self.interfaces = []<EOL>self.absinterfaces = []<EOL>self.variables = []<EOL><DEDENT>else:<EOL><INDENT>self.functions = [obj for obj in self.functions if to_include(obj)]<EOL>self.subroutines = [obj for obj in self.subroutines if to_include(obj)]<EOL>self.types = [obj for obj in self.types if to_include(obj)]<EOL>self.interfaces = [obj for obj in self.interfaces if to_include(obj)]<EOL>self.absinterfaces = [obj for obj in self.absinterfaces if to_include(obj)]<EOL>self.variables = [obj for obj in self.variables if to_include(obj)]<EOL>if hasattr(self,'<STR_LIT>'):<EOL><INDENT>self.modprocedures = [obj for obj in self.modprocedures if to_include(obj)]<EOL><DEDENT>if hasattr(self,'<STR_LIT>'):<EOL><INDENT>self.modsubroutines = [obj for obj in self.modsubroutines if to_include(obj)]<EOL><DEDENT>if hasattr(self,'<STR_LIT>'):<EOL><INDENT>self.modfunctions = [obj for obj in self.modfunctions if to_include(obj)]<EOL><DEDENT><DEDENT>for obj in self.absinterfaces:<EOL><INDENT>obj.visible = True<EOL><DEDENT>for obj in self.iterator('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>obj.visible = True<EOL><DEDENT>for obj in self.iterator('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>obj.prune()<EOL><DEDENT>
Remove anything which shouldn't be displayed.