def get_ignore_globs(self, which=constants.LOCAL_ONLY_FILE):
        all_globs = [
            constants.TICKET_DETAILS,
            constants.TICKET_COMMENTS,
            constants.TICKET_NEW_COMMENT,
            constants.TICKET_LINKS,
        ]
        for field in constants.FILE_FIELDS:
            all_globs.append(
                constants.TICKET_FILE_FIELD_TEMPLATE.format(field_name=field)
            )

        for plugin in self.plugins:
            if hasattr(plugin, 'get_ignore_globs'):
                all_globs.extend(plugin.get_ignore_globs())

        def get_globs_from_file(input_file):
            globs = []
            for line in input_file.readlines():
                if line.startswith('#') or not line.strip():
                    continue
                globs.append(line.strip())
            return globs

        try:
            with io.open(
                self.get_local_path(which),
                'r',
                encoding='utf-8'
            ) as local_ign:
                all_globs.extend(
                    get_globs_from_file(local_ign)
                )
        except IOError:
            pass

        try:
            with io.open(
                os.path.expanduser('~/%s' % which),
                'r',
                encoding='utf-8'
            ) as global_ignores:
                all_globs.extend(
                    get_globs_from_file(global_ignores)
                )
        except IOError:
            pass

        return all_globs
dataset/ETHPy150Open coddingtonbear/jirafs/jirafs/ticketfolder.py/TicketFolder.get_ignore_globs/original