add type hint to models

This commit is contained in:
Damien Elmes 2019-12-24 14:06:31 +10:00
parent bbbfb50998
commit 4863431c93

View file

@ -8,6 +8,7 @@ import re
import time import time
from typing import Any, Callable, Dict, List, Optional, Tuple, Union from typing import Any, Callable, Dict, List, Optional, Tuple, Union
import anki # pylint: disable=unused-import
from anki.consts import * from anki.consts import *
from anki.hooks import runHook from anki.hooks import runHook
from anki.lang import _ from anki.lang import _
@ -80,7 +81,7 @@ class ModelManager:
# Saving/loading registry # Saving/loading registry
############################################################# #############################################################
def __init__(self, col) -> None: def __init__(self, col: "anki.storage._Collection") -> None:
self.col = col self.col = col
self.models = {} self.models = {}
self.changed = False self.changed = False