🐛 Use List/Dict for type annotations to support ye olde Python

master
Mike Gerber 1 year ago
parent 968572168e
commit 3d920f2b50

@ -7,7 +7,7 @@ import warnings
from lxml import etree as ET from lxml import etree as ET
from itertools import groupby from itertools import groupby
from operator import attrgetter from operator import attrgetter
from typing import List from typing import Dict, List
from collections.abc import MutableMapping, Sequence from collections.abc import MutableMapping, Sequence
import click import click
@ -254,7 +254,7 @@ def mets_to_dict(mets, raise_errors=True):
pass pass
return value return value
def pages_to_dict(mets, raise_errors=True) -> list[dict]: def pages_to_dict(mets, raise_errors=True) -> List[Dict]:
# TODO replace asserts by ValueError # TODO replace asserts by ValueError
result = [] result = []

Loading…
Cancel
Save