mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
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:
parent
4b941d9461
commit
bf1d81aacc
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue