|
1 | 1 | import json |
2 | | -from collections.abc import Mapping, Sequence |
| 2 | +from collections.abc import Callable, Mapping, Sequence |
3 | 3 | from contextlib import suppress |
4 | 4 | from pathlib import PurePath |
5 | | -from typing import ( |
6 | | - Any, |
7 | | - Callable, |
8 | | - ClassVar, |
9 | | - Optional, |
10 | | -) |
| 5 | +from typing import Any, ClassVar |
11 | 6 |
|
12 | 7 | from .registry import _import_class, get_filesystem_class |
13 | 8 | from .spec import AbstractFileSystem |
@@ -45,12 +40,12 @@ class FilesystemJSONDecoder(json.JSONDecoder): |
45 | 40 | def __init__( |
46 | 41 | self, |
47 | 42 | *, |
48 | | - object_hook: Optional[Callable[[dict[str, Any]], Any]] = None, |
49 | | - parse_float: Optional[Callable[[str], Any]] = None, |
50 | | - parse_int: Optional[Callable[[str], Any]] = None, |
51 | | - parse_constant: Optional[Callable[[str], Any]] = None, |
| 43 | + object_hook: Callable[[dict[str, Any]], Any] | None = None, |
| 44 | + parse_float: Callable[[str], Any] | None = None, |
| 45 | + parse_int: Callable[[str], Any] | None = None, |
| 46 | + parse_constant: Callable[[str], Any] | None = None, |
52 | 47 | strict: bool = True, |
53 | | - object_pairs_hook: Optional[Callable[[list[tuple[str, Any]]], Any]] = None, |
| 48 | + object_pairs_hook: Callable[[list[tuple[str, Any]]], Any] | None = None, |
54 | 49 | ) -> None: |
55 | 50 | self.original_object_hook = object_hook |
56 | 51 |
|
|
0 commit comments