|
10 | 10 | from errno import ESPIPE
|
11 | 11 | from glob import has_magic
|
12 | 12 | from hashlib import sha256
|
13 |
| -from typing import Any, ClassVar, Dict, Tuple |
| 13 | +from typing import Any, ClassVar |
14 | 14 |
|
15 | 15 | from .callbacks import DEFAULT_CALLBACK
|
16 | 16 | from .config import apply_config, conf
|
@@ -117,8 +117,8 @@ class AbstractFileSystem(metaclass=_Cached):
|
117 | 117 | _extra_tokenize_attributes = ()
|
118 | 118 |
|
119 | 119 | # Set by _Cached metaclass
|
120 |
| - storage_args: Tuple[Any, ...] |
121 |
| - storage_options: Dict[str, Any] |
| 120 | + storage_args: tuple[Any, ...] |
| 121 | + storage_options: dict[str, Any] |
122 | 122 |
|
123 | 123 | def __init__(self, *args, **storage_options):
|
124 | 124 | """Create and configure file-system instance
|
@@ -615,11 +615,9 @@ def glob(self, path, maxdepth=None, **kwargs):
|
615 | 615 | p: info
|
616 | 616 | for p, info in sorted(allpaths.items())
|
617 | 617 | if pattern.match(
|
618 |
| - ( |
619 |
| - p + "/" |
620 |
| - if append_slash_to_dirname and info["type"] == "directory" |
621 |
| - else p |
622 |
| - ) |
| 618 | + p + "/" |
| 619 | + if append_slash_to_dirname and info["type"] == "directory" |
| 620 | + else p |
623 | 621 | )
|
624 | 622 | }
|
625 | 623 |
|
@@ -1442,7 +1440,7 @@ def from_json(blob: str) -> AbstractFileSystem:
|
1442 | 1440 |
|
1443 | 1441 | return json.loads(blob, cls=FilesystemJSONDecoder)
|
1444 | 1442 |
|
1445 |
| - def to_dict(self, *, include_password: bool = True) -> Dict[str, Any]: |
| 1443 | + def to_dict(self, *, include_password: bool = True) -> dict[str, Any]: |
1446 | 1444 | """
|
1447 | 1445 | JSON-serializable dictionary representation of this filesystem instance.
|
1448 | 1446 |
|
@@ -1483,7 +1481,7 @@ def to_dict(self, *, include_password: bool = True) -> Dict[str, Any]:
|
1483 | 1481 | )
|
1484 | 1482 |
|
1485 | 1483 | @staticmethod
|
1486 |
| - def from_dict(dct: Dict[str, Any]) -> AbstractFileSystem: |
| 1484 | + def from_dict(dct: dict[str, Any]) -> AbstractFileSystem: |
1487 | 1485 | """
|
1488 | 1486 | Recreate a filesystem instance from dictionary representation.
|
1489 | 1487 |
|
|
0 commit comments