From d8f059b570a8f2e99348a8b6c2b521f46bf141ef Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 18 Feb 2019 12:44:04 +1000 Subject: [PATCH] style and arg order fix --- anki/collection.py | 6 +++--- aqt/clayout.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/anki/collection.py b/anki/collection.py index 8f6221ba3..30f447b67 100644 --- a/anki/collection.py +++ b/anki/collection.py @@ -417,7 +417,7 @@ insert into cards values (?,?,?,?,?,?,0,0,?,0,0,0,0,0,0,0,0,"")""", # type 0 - when previewing in add dialog, only non-empty # type 1 - when previewing edit, only existing # type 2 - when previewing in models dialog, all templates - def previewCards(self, note, type=0, did = None): + def previewCards(self, note, type=0, did=None): if type == 0: cms = self.findTemplates(note) elif type == 1: @@ -428,10 +428,10 @@ insert into cards values (?,?,?,?,?,?,0,0,?,0,0,0,0,0,0,0,0,"")""", return [] cards = [] for template in cms: - cards.append(self._newCard(note, template, 1, flush=False, did = did)) + cards.append(self._newCard(note, template, 1, flush=False, did=did)) return cards - def _newCard(self, note, template, due, did = None, flush=True): + def _newCard(self, note, template, due, flush=True, did=None): "Create a new card." card = anki.cards.Card(self) card.nid = note.id diff --git a/aqt/clayout.py b/aqt/clayout.py index 037f3b954..207537ee8 100644 --- a/aqt/clayout.py +++ b/aqt/clayout.py @@ -64,7 +64,7 @@ class CardLayout(QDialog): did = None if hasattr(self.parent,"deckChooser"): did = self.parent.deckChooser.selectedId() - self.cards = self.col.previewCards(self.note, 2, did = did) + self.cards = self.col.previewCards(self.note, 2, did=did) idx = self.ord if idx >= len(self.cards): self.ord = len(self.cards) - 1