fix cyclic import when importing anki.collection directly

Could be triggered with:
PYTHONPATH=.bazel/bin/qt/runanki.runfiles/ankidesktop/pylib python -c 'import anki.collection'
This commit is contained in:
Damien Elmes 2022-02-15 19:06:45 +10:00
parent 4b941d9461
commit bf1d81aacc

View file

@ -5,9 +5,10 @@ from __future__ import annotations
import re import re
from re import Match from re import Match
from typing import Any, Iterable, Sequence, Union from typing import TYPE_CHECKING, Any, Iterable, Sequence, Union
import anki._backend if TYPE_CHECKING:
import anki._backend
# DBValue is actually Union[str, int, float, None], but if defined # DBValue is actually Union[str, int, float, None], but if defined
# that way, every call site needs to do a type check prior to using # that way, every call site needs to do a type check prior to using