Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: proper __setitem__ and insert for RepeatedComposite #178

Merged
merged 4 commits into from
Feb 10, 2021
Merged

fix: proper __setitem__ and insert for RepeatedComposite #178

merged 4 commits into from
Feb 10, 2021

Conversation

0x2b3bfa0
Copy link
Contributor

@0x2b3bfa0 0x2b3bfa0 commented Jan 9, 2021

Fixes #177; please refer to the issue for context.

The proposed solution is not elegant at all, but might be the best in the short term until the underlying protocol buffer object supports the __setitem__ method.

Nota bene: the underlying RepeatedCompositeFieldContainer from google.protobuf.internal.containers already supports the insert method, and we only need to perform type conversion for this particular case.

@0x2b3bfa0 0x2b3bfa0 requested a review from a team as a code owner January 9, 2021 09:25
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jan 9, 2021
@codecov
Copy link

codecov bot commented Feb 9, 2021

Codecov Report

Merging #178 (6246c1c) into master (6a43682) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #178   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           20        20           
  Lines          862       881   +19     
  Branches       149       159   +10     
=========================================
+ Hits           862       881   +19     
Impacted Files Coverage Δ
proto/modules.py 100.00% <ø> (ø)
proto/marshal/collections/repeated.py 100.00% <100.00%> (ø)
proto/marshal/marshal.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 30265d6...6246c1c. Read the comment docs.

@software-dov software-dov merged commit 1157a76 into googleapis:master Feb 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken __setitem__ assignment for RepeatedComposite
2 participants