organize typing imports in dedupe/blocking.py
@@ -5,6 +5,9 @@ from __future__ import annotations
import logging
import time
from collections import defaultdict
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
from typing import (
Any,
Callable,
@@ -20,12 +23,11 @@ import dedupe.predicates
from dedupe._typing import Data, Record, RecordID
from dedupe.index import Index
-logger = logging.getLogger(__name__)
-
Docs = Union[Iterable[str], Iterable[Iterable[str]]]
+ IndexList = DefaultDict[str, List[dedupe.predicates.IndexPredicate]]
-IndexList = DefaultDict[str, List[dedupe.predicates.IndexPredicate]]
+logger = logging.getLogger(__name__)
def index_list() -> IndexList:
