(self)
return info
Return the current selected dataset info or None if not selected

        Returns
        -------
        info : Optional[Namespace]
Return the current selected dataset info or None if not selected
Return the current selected dataset info or None if not selected
def selected_dataset(self):
        """
        Return the current selected dataset info or None if not selected

        Returns
        -------
        info : Optional[Namespace]
        """
        rows = self.view.selectionModel().selectedRows(0)
        assert 0 <= len(rows) <= 1
        current = rows[0] if rows else None  # type: Optional[QModelIndex]
        if current is not None:
            info = current.data(Qt.UserRole)
            assert isinstance(info, Namespace)
        else:
            info = None
        return info
def selected_dataset ( self ) : rows = self . view . selectionModel ( ) . selectedRows ( 0 ) assert 0 <= len ( rows ) <= 1 current = rows [ 0 ] if rows else None # type: Optional[QModelIndex] if current is not None : info = current . data ( Qt . UserRole ) assert isinstance ( info , Namespace ) else : info = None return info