Bump pyright to v1.1.360 (#11810)

This commit is contained in:
Alex Waygood
2024-04-24 13:09:16 +01:00
committed by GitHub
parent 29db988c0a
commit d0f2be92ab
20 changed files with 100 additions and 46 deletions

View File

@@ -80,7 +80,9 @@ class OpenDescriptor(Generic[_IOT]):
def buffer_size_for_stream(cls, stream: object) -> int: ...
class FileObjectBase(Generic[_IOT, AnyStr]):
def __init__(self: FileObjectBase[_IOT, AnyStr], descriptor: OpenDescriptor[_IOT]) -> None: ...
def __init__(
self: FileObjectBase[_IOT, AnyStr], descriptor: OpenDescriptor[_IOT] # pyright: ignore[reportInvalidTypeVarUse] #11780
) -> None: ...
io: _IOT
@property
def closed(self) -> bool: ...

View File

@@ -31,7 +31,9 @@ class Lazy(Generic[_T]):
class readproperty(Generic[_T]):
func: Callable[[Any], _T]
def __init__(self: readproperty[_T], func: Callable[[Any], _T]) -> None: ...
def __init__(
self: readproperty[_T], func: Callable[[Any], _T] # pyright: ignore[reportInvalidTypeVarUse] #11780
) -> None: ...
@overload
def __get__(self, inst: None, class_: type[object]) -> Self: ...
@overload

View File

@@ -19,7 +19,12 @@ class Greenlet(greenlet.greenlet, Generic[_P, _T]):
kwargs: dict[str, Any]
value: _T | None
@overload
def __init__(self: Greenlet[_P, _T], run: Callable[_P, _T], *args: _P.args, **kwargs: _P.kwargs) -> None: ...
def __init__(
self: Greenlet[_P, _T], # pyright: ignore[reportInvalidTypeVarUse] #11780
run: Callable[_P, _T],
*args: _P.args,
**kwargs: _P.kwargs,
) -> None: ...
@overload
def __init__(self: Greenlet[[], None]) -> None: ...
@readproperty