add legacy NoteType alias

https://github.com/johnpincock/SpecialFields/issues/28
This commit is contained in:
Damien Elmes 2021-05-18 09:13:59 +10:00
parent bd24005e08
commit 009878f75d

View File

@ -33,11 +33,13 @@ NotetypeNameId = _pb.NotetypeNameId
NotetypeNameIdUseCount = _pb.NotetypeNameIdUseCount
# types
# legacy types
NotetypeDict = Dict[str, Any]
NoteType = NotetypeDict
FieldDict = Dict[str, Any]
TemplateDict = Dict[str, Union[str, int, None]]
NotetypeId = NewType("NotetypeId", int)
sys.modules["anki.models"].NoteType = NotetypeDict # type: ignore
class ModelsDictProxy: