mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-27 12:02:19 +08:00
Bump various test dependencies (#11249)
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
from collections.abc import Callable, Iterable, Iterator, MutableMapping, Sequence
|
||||
from typing import Any, SupportsIndex, TypeVar, overload
|
||||
from typing import Any, Protocol, SupportsIndex, TypeVar, overload
|
||||
|
||||
from google.protobuf.descriptor import Descriptor
|
||||
from google.protobuf.internal.message_listener import MessageListener
|
||||
from google.protobuf.internal.python_message import GeneratedProtocolMessageType
|
||||
from google.protobuf.internal.type_checkers import _ValueChecker
|
||||
from google.protobuf.message import Message
|
||||
|
||||
_T = TypeVar("_T")
|
||||
@@ -13,6 +12,10 @@ _ScalarV = TypeVar("_ScalarV", bound=bool | int | float | str | bytes)
|
||||
_MessageV = TypeVar("_MessageV", bound=Message)
|
||||
_M = TypeVar("_M")
|
||||
|
||||
class _ValueChecker(Protocol[_T]):
|
||||
def CheckValue(self, proposed_value: _T) -> _T: ...
|
||||
def DefaultValue(self) -> _T: ...
|
||||
|
||||
class BaseContainer(Sequence[_T]):
|
||||
def __init__(self, message_listener: MessageListener) -> None: ...
|
||||
def __len__(self) -> int: ...
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
from typing import Generic, Protocol, TypeVar
|
||||
from typing import Generic, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
class _ValueChecker(Protocol[_T]):
|
||||
def CheckValue(self, proposed_value: _T) -> _T: ...
|
||||
def DefaultValue(self) -> _T: ...
|
||||
|
||||
class TypeChecker(Generic[_T]):
|
||||
def __init__(self, *acceptable_types: _T): ...
|
||||
def CheckValue(self, proposed_value: _T) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user