(self)
return items[::-1]
Return items from local history.
Return items from local history.
Return items from local history .
def itemsFromSettings(self):
        # type: () -> List[Tuple[str, Options]]
        """
        Return items from local history.
        """
        s = self._local_settings()
        items_ = QSettings_readArray(s, "recent", OWCSVFileImport.SCHEMA)
        items = []  # type: List[Tuple[str, Options]]
        for item in items_:
            path = item.get("path", "")
            if not path:
                continue
            opts_json = item.get("options", "")
            try:
                opts = Options.from_dict(json.loads(opts_json))
            except (csv.Error, LookupError, TypeError, json.JSONDecodeError):
                _log.error("Could not reconstruct options for '%s'", path,
                           exc_info=True)
            else:
                items.append((path, opts))
        return items[::-1]
def itemsFromSettings ( self ) : # type: () -> List[Tuple[str, Options]] s = self . _local_settings ( ) items_ = QSettings_readArray ( s , "recent" , OWCSVFileImport . SCHEMA ) items = [ ] # type: List[Tuple[str, Options]] for item in items_ : path = item . get ( "path" , "" ) if not path : continue opts_json = item . get ( "options" , "" ) try : opts = Options . from_dict ( json . loads ( opts_json ) ) except ( csv . Error , LookupError , TypeError , json . JSONDecodeError ) : _log . error ( "Could not reconstruct options for '%s'" , path , exc_info = True ) else : items . append ( ( path , opts ) ) return items [ : : - 1 ]