Skip to content

Commit 3ccf672

Browse files
Hiromu Hotalukehsiao
authored andcommitted
Correct type hints
1 parent fd5d3a3 commit 3ccf672

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/fonduer/utils/data_model_utils/visual.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from builtins import range
66
from collections import defaultdict
77
from functools import lru_cache
8-
from typing import DefaultDict, Iterator, List, Set, Union
8+
from typing import Any, DefaultDict, Iterator, List, Set, Union
99

1010
from fonduer.candidates.mentions import Ngrams
1111
from fonduer.candidates.models import Candidate, Mention
@@ -421,10 +421,10 @@ def _preprocess_visual_features(doc: Document) -> None:
421421

422422
for page, sentences in sentence_by_page.items():
423423
# process per page alignments
424-
yc_aligned: DefaultDict[int, List[Sentence]] = defaultdict(list)
425-
x0_aligned: DefaultDict[int, List[Sentence]] = defaultdict(list)
426-
xc_aligned: DefaultDict[int, List[Sentence]] = defaultdict(list)
427-
x1_aligned: DefaultDict[int, List[Sentence]] = defaultdict(list)
424+
yc_aligned: DefaultDict[Any, List[Sentence]] = defaultdict(list)
425+
x0_aligned: DefaultDict[Any, List[Sentence]] = defaultdict(list)
426+
xc_aligned: DefaultDict[Any, List[Sentence]] = defaultdict(list)
427+
x1_aligned: DefaultDict[Any, List[Sentence]] = defaultdict(list)
428428
for sentence in sentences:
429429
sentence.bbox = sentence.get_bbox()
430430
sentence.yc = (sentence.bbox.top + sentence.bbox.bottom) / 2

0 commit comments

Comments
 (0)