mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00

* 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`
23 lines
751 B
Python
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
|