From 7f2610568a946edd4f72da0f77c413c223cb3ce6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 13 Apr 2020 19:26:12 +1000 Subject: [PATCH] Revert "remove unused decks.count()" This reverts commit c79b6835bf1c0baffa5c4f39110e07aa51aed044. https://github.com/ankitects/anki/commit/c79b6835bf1c0baffa5c4f39110e07aa51aed044 --- pylib/anki/decks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pylib/anki/decks.py b/pylib/anki/decks.py index 91029d953..18796f713 100644 --- a/pylib/anki/decks.py +++ b/pylib/anki/decks.py @@ -200,6 +200,9 @@ class DeckManager: deck["browserCollapsed"] = not collapsed self.save(deck) + def count(self) -> int: + return len(self.decks) + def get(self, did: Union[int, str], default: bool = True) -> Any: id = str(did) if id in self.decks: