Use PEP 585 syntax wherever possible (#6717)

This commit is contained in:
Alex Waygood authored and GitHub committed 2021-12-28 11:31:43 +01:00
1 parent e6cb341d94
commit 8d5d2520ac
237 files changed
+966 -1069

No files matched your search

+6 -6
View File
@@ -1,11 +1,11 @@
import sys
from typing import Any, Callable, ClassVar, Iterable, Iterator, Mapping, Optional, Protocol, Tuple, Type, Union
from typing import Any, Callable, ClassVar, Iterable, Iterator, Mapping, Optional, Protocol, Type, Union
from typing_extensions import final
HIGHEST_PROTOCOL: int
DEFAULT_PROTOCOL: int
bytes_types: Tuple[Type[Any], ...] # undocumented
bytes_types: tuple[Type[Any], ...] # undocumented
class _ReadableFileobj(Protocol):
def read(self, __n: int) -> bytes: ...
@@ -58,10 +58,10 @@ class UnpicklingError(PickleError): ...
_reducedtype = Union[
str,
Tuple[Callable[..., Any], Tuple[Any, ...]],
Tuple[Callable[..., Any], Tuple[Any, ...], Any],
Tuple[Callable[..., Any], Tuple[Any, ...], Any, Optional[Iterator[Any]]],
Tuple[Callable[..., Any], Tuple[Any, ...], Any, Optional[Iterator[Any]], Optional[Iterator[Any]]],
tuple[Callable[..., Any], tuple[Any, ...]],
tuple[Callable[..., Any], tuple[Any, ...], Any],
tuple[Callable[..., Any], tuple[Any, ...], Any, Optional[Iterator[Any]]],
tuple[Callable[..., Any], tuple[Any, ...], Any, Optional[Iterator[Any]], Optional[Iterator[Any]]],
]
class Pickler: