Enable flake8-pyi's Y037 (#9686)

This commit is contained in:
Alex Waygood
2023-02-07 03:01:02 +00:00
committed by GitHub
parent c4c4bee8aa
commit 0ef9c3f8e8
38 changed files with 119 additions and 201 deletions

View File

@@ -1,7 +1,7 @@
import sys
from _typeshed import ReadableBuffer, SupportsWrite
from collections.abc import Callable, Iterable, Iterator, Mapping
from typing import Any, ClassVar, Protocol, SupportsBytes, Union
from typing import Any, ClassVar, Protocol, SupportsBytes
from typing_extensions import SupportsIndex, TypeAlias, final
__all__ = [
@@ -142,13 +142,13 @@ class PickleError(Exception): ...
class PicklingError(PickleError): ...
class UnpicklingError(PickleError): ...
_ReducedType: TypeAlias = Union[
str,
tuple[Callable[..., Any], tuple[Any, ...]],
tuple[Callable[..., Any], tuple[Any, ...], Any],
tuple[Callable[..., Any], tuple[Any, ...], Any, Iterator[Any] | None],
tuple[Callable[..., Any], tuple[Any, ...], Any, Iterator[Any] | None, Iterator[Any] | None],
]
_ReducedType: TypeAlias = (
str
| tuple[Callable[..., Any], tuple[Any, ...]]
| tuple[Callable[..., Any], tuple[Any, ...], Any]
| tuple[Callable[..., Any], tuple[Any, ...], Any, Iterator[Any] | None]
| tuple[Callable[..., Any], tuple[Any, ...], Any, Iterator[Any] | None, Iterator[Any] | None]
)
class Pickler:
fast: bool