mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 12:44:28 +08:00
Add __eq__ to protobuf containers (#3126)
See https://github.com/protocolbuffers/protobuf/blob/master/python/google/protobuf/internal/containers.py. Without these `mypy --strict-equality` causes false positives with protobufs.
This commit is contained in:
@@ -35,6 +35,7 @@ class RepeatedScalarFieldContainer(BaseContainer[_T]):
|
||||
def __setslice__(self, start: int, stop: int, values: Iterable[_T]) -> None: ...
|
||||
def __delitem__(self, key: Union[int, slice]) -> None: ...
|
||||
def __delslice__(self, start: int, stop: int) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
class RepeatedCompositeFieldContainer(BaseContainer[_T]):
|
||||
def __init__(self, message_listener: MessageListener, type_checker: Any) -> None: ...
|
||||
@@ -46,6 +47,7 @@ class RepeatedCompositeFieldContainer(BaseContainer[_T]):
|
||||
def __getslice__(self, start: int, stop: int) -> List[_T]: ...
|
||||
def __delitem__(self, key: Union[int, slice]) -> None: ...
|
||||
def __delslice__(self, start: int, stop: int) -> None: ...
|
||||
def __eq__(self, other: object) -> bool: ...
|
||||
|
||||
# Classes not yet typed
|
||||
class Mapping(Any): ...
|
||||
|
||||
Reference in New Issue
Block a user