Don't use deprecated Type construct
This commit is contained in:
		| @@ -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, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user