From 51ba2b5870ea16e02f27993c85e131285a571136 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Mon, 21 Sep 2020 06:02:10 +0200 Subject: [PATCH] NF: remove _changedGuids Nothing is ever added to the map. That was a bug detected by lint in ankidroid --- pylib/anki/importing/anki2.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pylib/anki/importing/anki2.py b/pylib/anki/importing/anki2.py index e3c31081e..6e8a72d2e 100644 --- a/pylib/anki/importing/anki2.py +++ b/pylib/anki/importing/anki2.py @@ -82,9 +82,6 @@ class Anki2Importer(Importer): ): self._notes[guid] = (id, mod, mid) existing[id] = True - # we may need to rewrite the guid if the model schemas don't match, - # so we need to keep track of the changes for the card import stage - self._changedGuids: Dict[str, bool] = {} # we ignore updates to changed schemas. we need to note the ignored # guids, so we avoid importing invalid cards self._ignoredGuids: Dict[str, bool] = {} @@ -315,8 +312,6 @@ class Anki2Importer(Importer): "select f.guid, f.mid, c.* from cards c, notes f " "where c.nid = f.id" ): guid = card[0] - if guid in self._changedGuids: - guid = self._changedGuids[guid] if guid in self._ignoredGuids: continue # does the card's note exist in dst col?