Anki/pylib/anki/scheduler/__init__.py
RumovZ 9aca778a93
Backend Custom Study (#1600)
* Implement custom study on backend

* Switch frontend to backend custom study

* Skip typecheck for new pb classes

* Build tag search string on backend

Also fixes escaping of special characters in tag names.

* `cram.cards` -> `cram.card_limit`

* Assign more meaningful names in `TagLimit`

* Broaden rustfmt glob

* Use `invalid_input()` helper

* Assign `FilteredDeckForUpdate` to temp var

* Implement `SearchBuilder`

* Rewrite `custom_study()` with `SearchBuilder`

* Replace match macros with `SearchBuilder`

* Remove `into_nodes_list` & `concatenate_searches`
2022-01-20 14:25:22 +10:00

23 lines
751 B
Python

# Copyright: Ankitects Pty Ltd and contributors
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
from __future__ import annotations
import sys
import anki.scheduler.base as _base
UnburyDeck = _base.UnburyDeck
CongratsInfo = _base.CongratsInfo
BuryOrSuspend = _base.BuryOrSuspend
FilteredDeckForUpdate = _base.FilteredDeckForUpdate
CustomStudyRequest = _base.CustomStudyRequest
# add aliases to the legacy pathnames
import anki.scheduler.v1
import anki.scheduler.v2
sys.modules["anki.sched"] = sys.modules["anki.scheduler.v1"]
sys.modules["anki.schedv2"] = sys.modules["anki.scheduler.v2"]
anki.sched = sys.modules["anki.scheduler.v1"] # type: ignore
anki.schedv2 = sys.modules["anki.scheduler.v2"] # type: ignore