mirror of
https://github.com/qurator-spk/dinglehopper.git
synced 2025-06-09 11:50:00 +02:00
🐛 dinglehopper: Fix alto_extract_lines()'s type annotation
This commit is contained in:
parent
fe3923a8af
commit
389e253c11
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
from __future__ import division, print_function
|
||||
|
||||
from typing import Generator
|
||||
from typing import Iterator
|
||||
from warnings import warn
|
||||
import sys
|
||||
|
||||
|
@ -23,7 +23,7 @@ def alto_namespace(tree: ET.ElementTree) -> str:
|
|||
raise ValueError("Not an ALTO tree")
|
||||
|
||||
|
||||
def alto_extract_lines(tree: ET.ElementTree) -> Generator[ExtractedText, None, None]:
|
||||
def alto_extract_lines(tree: ET.ElementTree) -> Iterator[ExtractedText]:
|
||||
nsmap = {"alto": alto_namespace(tree)}
|
||||
for line in tree.iterfind(".//alto:TextLine", namespaces=nsmap):
|
||||
line_id = line.attrib.get("ID")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue