def updateCards(self):
        suspendIds = set([])

        for nid in self.newNoteIds:
            note = mw.col.getNote(nid)
            if not nid in self.cardStats:
                continue
            stats = self.cardStats[nid]

            # Use the same statistics for both directions.
            for card in note.cards():
                self._updateStatistics(card, stats, suspendIds)
                card.flush()
                self._cards.append((nid, card.ord, card))

        TextImporter.updateCards(self)
        mw.col.sched.suspendCards(suspendIds)
    def updateCards(self):
        suspendIds = set([])

        for nid in self.newNoteIds:
            note = mw.col.getNote(nid)
            if not nid in self.cardStats:
                continue
            stats = self.cardStats[nid]

            # Use the same statistics for both directions.
            for card in note.cards():
                self._updateStatistics(card, stats, suspendIds)
                card.flush()
                self._cards.append((nid, card.ord, card))

        TextImporter.updateCards(self)
        mw.col.sched.suspendCards(suspendIds)