Don't use deprecated Type construct

This commit is contained in:
Matthias 2023-03-11 15:15:32 +01:00
parent 59d2ff3ffa
commit 8726a4645d

View File

@ -6,8 +6,7 @@ import logging
import re import re
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
from typing import Any, Dict, Iterator, List, Mapping, Optional, Union from typing import Any, Dict, Iterator, List, Mapping, Optional, TextIO, Union
from typing.io import IO
from urllib.parse import urlparse from urllib.parse import urlparse
import orjson import orjson
@ -103,7 +102,7 @@ def file_dump_joblib(filename: Path, data: Any, log: bool = True) -> None:
logger.debug(f'done joblib dump to "{filename}"') logger.debug(f'done joblib dump to "{filename}"')
def json_load(datafile: IO) -> Any: def json_load(datafile: Union[gzip.GzipFile, TextIO]) -> Any:
""" """
load data with rapidjson load data with rapidjson
Use this to have a consistent experience, Use this to have a consistent experience,