Bump various test dependencies (#11249)

This commit is contained in:
Alex Waygood
2024-01-05 22:09:02 +00:00
committed by GitHub
parent a7c5d8bc14
commit ccc81f224d
7 changed files with 25 additions and 14 deletions

View File

@@ -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: ...

View File

@@ -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: ...