mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-20 02:41:16 +08:00
Bump pyright version (#10591)
Release: https://github.com/microsoft/pyright/releases/tag/1.1.323 Fix types-pika to work with the latest pyright version. --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This commit is contained in:
@@ -97,4 +97,4 @@ select = [
|
||||
]
|
||||
|
||||
[tool.typeshed]
|
||||
pyright_version = "1.1.320"
|
||||
pyright_version = "1.1.323"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# We don't want to force it as a dependency but that means we also can't test it with type-checkers given the current setup.
|
||||
|
||||
from _typeshed import Incomplete
|
||||
from typing import NamedTuple, TypeVar
|
||||
from typing import Generic, NamedTuple, TypeVar
|
||||
|
||||
import pika.connection
|
||||
from pika.adapters.utils import nbio_interface
|
||||
@@ -16,11 +16,11 @@ _T = TypeVar("_T")
|
||||
|
||||
LOGGER: Incomplete
|
||||
|
||||
class ClosableDeferredQueue(DeferredQueue[_T]): # pyright: ignore[reportUntypedBaseClass]
|
||||
class ClosableDeferredQueue(DeferredQueue[_T], Generic[_T]): # pyright: ignore[reportUntypedBaseClass]
|
||||
closed: Failure | BaseException | None
|
||||
def __init__(self, size: Incomplete | None = ..., backlog: Incomplete | None = ...) -> None: ...
|
||||
# Returns a Deferred with an error if fails. None if success
|
||||
def put(self, obj: _T) -> Deferred[Failure | BaseException] | None: ... # type: ignore[override] # pyright: ignore[reportInvalidTypeVarUse]
|
||||
def put(self, obj: _T) -> Deferred[Failure | BaseException] | None: ... # type: ignore[override]
|
||||
def get(self) -> Deferred[Failure | BaseException | _T]: ...
|
||||
pending: Incomplete
|
||||
def close(self, reason: BaseException | None) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user