Use typing.Tuple to support 3.8.

This commit is contained in:
ljnsn 2022-12-21 21:20:20 +01:00
parent bf57625864
commit e6e32f9108
1 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
from pathlib import Path
from typing import Iterator, Optional, Union
from typing import Iterator, Optional, Tuple, Union
from lxml import etree
@ -60,7 +60,7 @@ def is_float(cell: etree._Element) -> bool:
def get_value(
cell: etree._Element,
parsed: bool = False,
) -> tuple[Optional[Union[str, float]], int]:
) -> Tuple[Optional[Union[str, float]], int]:
text = cell.find(TABLE_CELL_TEXT_TAG, namespaces=cell.nsmap)
if text is None:
return None, 0