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

@@ -3,7 +3,7 @@ from _ctypes import RTLD_GLOBAL as RTLD_GLOBAL, RTLD_LOCAL as RTLD_LOCAL
from _typeshed import ReadableBuffer, Self, WriteableBuffer
from abc import abstractmethod
from collections.abc import Callable, Iterable, Iterator, Mapping, Sequence
from typing import Any, ClassVar, Generic, TypeVar, Union as _UnionT, overload
from typing import Any, ClassVar, Generic, TypeVar, overload
from typing_extensions import TypeAlias
if sys.version_info >= (3, 9):
@@ -91,7 +91,7 @@ class _CanCastTo(_CData): ...
class _PointerLike(_CanCastTo): ...
_ECT: TypeAlias = Callable[[type[_CData] | None, _FuncPointer, tuple[_CData, ...]], _CData]
_PF: TypeAlias = _UnionT[tuple[int], tuple[int, str], tuple[int, str, Any]]
_PF: TypeAlias = tuple[int] | tuple[int, str] | tuple[int, str, Any]
class _FuncPointer(_PointerLike, _CData):
restype: type[_CData] | Callable[[int], Any] | None