(self)
return res
Return the column type specs as column ranges.

        Returns
        -------
        coltypes : List[Tuple[range, ColumnType]]
            A list of `(range, coltype)` tuples where `range` are ranges
            with step 1 and coltype a ColumnType. The ranges are sorted
            in ascending order.

        Note
        ----
        Unlike `columnTypes` this method does not omit ColumnTypes.Auto
        entries.
Return the column type specs as column ranges.
Return the column type specs as column ranges .
def columnTypeRanges(self):
        # type: () -> List[Tuple[range, ColumnType]]
        """
        Return the column type specs as column ranges.

        Returns
        -------
        coltypes : List[Tuple[range, ColumnType]]
            A list of `(range, coltype)` tuples where `range` are ranges
            with step 1 and coltype a ColumnType. The ranges are sorted
            in ascending order.

        Note
        ----
        Unlike `columnTypes` this method does not omit ColumnTypes.Auto
        entries.
        """
        model = self.__previewmodel
        if model is None:
            return []
        res = dict.fromkeys(range(model.columnCount()), ColumnType.Auto)
        res.update(self.__columnTypes())
        types = sorted(res.items())
        res = []

        # Group by increasing indices (with step 1) and coltype
        def groupkey(item, __incseq=iter(itertools.count())):
            index, val = item
            return index - next(__incseq), val

        for (_, key), items in itertools.groupby(types, key=groupkey):
            items = list(items)
            start = items[0][0]
            last = items[-1][0]
            res.append((range(start, last + 1), key))
        return res
def columnTypeRanges ( self ) : # type: () -> List[Tuple[range, ColumnType]] model = self . __previewmodel if model is None : return [ ] res = dict . fromkeys ( range ( model . columnCount ( ) ) , ColumnType . Auto ) res . update ( self . __columnTypes ( ) ) types = sorted ( res . items ( ) ) res = [ ] # Group by increasing indices (with step 1) and coltype def groupkey ( item , __incseq = iter ( itertools . count ( ) ) ) : index , val = item return index - next ( __incseq ) , val for ( _ , key ) , items in itertools . groupby ( types , key = groupkey ) : items = list ( items ) start = items [ 0 ] [ 0 ] last = items [ - 1 ] [ 0 ] res . append ( ( range ( start , last + 1 ) , key ) ) return res