Skip to content

protobuf MergeFrom for Repeated Containers should accept Iterable type #10192

@raphaelboudreault

Description

@raphaelboudreault

Hello everyone,

In the containers.pyi stub file for the protobuf-types package, I believe methods MergeFrom for classes RepeatedScalarFieldContainer and RepeatedCompositeFieldContainer should also accept the Iterable[_T] type, where _T is the type of the scalar/message. The typing in containers.py is indeed correct:

  def MergeFrom(self, other: Union['RepeatedScalarFieldContainer[_T]', Iterable[_T]]) -> None:
  def MergeFrom(self, other: Union['RepeatedCompositeFieldContainer[_T]', Iterable[_T]]) -> None:

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions