Remove remaining bare Incompletes (#11768)

Enable Y065
This commit is contained in:
Sebastian Rittau
2024-04-16 15:26:14 +02:00
committed by GitHub
parent 7c8e82fe48
commit 7d56cd9a6c
33 changed files with 110 additions and 100 deletions

View File

@@ -1,17 +1,21 @@
from _typeshed import Incomplete
from collections.abc import Iterator, Mapping as DictMixin
from typing import TypeVar
class LazyDict(DictMixin[str, Incomplete]):
data: dict[str, Incomplete] | None
def __getitem__(self, key: str) -> Incomplete: ...
_T = TypeVar("_T")
_VT = TypeVar("_VT")
class LazyDict(DictMixin[str, _VT]):
data: dict[str, _VT] | None
def __getitem__(self, key: str) -> _VT: ...
def __contains__(self, key: object) -> bool: ...
def __iter__(self) -> Iterator[str]: ...
def __len__(self) -> int: ...
class LazyList(list[Incomplete]):
class LazyList(list[_T]):
# does not return `Self` type:
def __new__(cls, fill_iter: Incomplete | None = None) -> LazyList: ... # noqa: Y034
def __new__(cls, fill_iter: Incomplete | None = None) -> LazyList[_T]: ...
class LazySet(set[Incomplete]):
class LazySet(set[_T]):
# does not return `Self` type:
def __new__(cls, fill_iter: Incomplete | None = None) -> LazySet: ... # noqa: Y034
def __new__(cls, fill_iter: Incomplete | None = None) -> LazySet[_T]: ...