From 08e13013b237c9334ab8753e8e0a488f05be5446 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Thu, 25 Mar 2021 14:02:46 +0100 Subject: [PATCH] NF: default_deck_conf_id as constant So that the 1 is clearer --- pylib/anki/decks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pylib/anki/decks.py b/pylib/anki/decks.py index 24439c728..7bc8dd37f 100644 --- a/pylib/anki/decks.py +++ b/pylib/anki/decks.py @@ -32,6 +32,7 @@ DeckConfigDict = Dict[str, Any] DeckID = NewType("DeckID", int) default_deck_id = 1 +default_deck_conf_id = 1 class DecksDictProxy: @@ -319,7 +320,7 @@ class DeckManager: conf = self.get_config(dcid) if not conf: # fall back on default - conf = self.get_config(1) + conf = self.get_config(default_deck_conf_id) conf["dyn"] = False return conf # dynamic decks have embedded conf @@ -579,7 +580,7 @@ class DeckManager: def new_filtered(self, name: str) -> int: "Return a new dynamic deck and set it as the current deck." - did = self.id(name, type=1) + did = self.id(name, type=default_deck_conf_id) self.select(did) return did