fix(ifex_to_protobuf): remove duplicate keys from type_translation dict#176
Open
SoundMatt wants to merge 1 commit into
Open
fix(ifex_to_protobuf): remove duplicate keys from type_translation dict#176SoundMatt wants to merge 1 commit into
SoundMatt wants to merge 1 commit into
Conversation
The type_translation dict contained six entries that duplicated keys
already defined earlier in the same literal:
"int32" : "sint32" # duplicate of "int32" : "int32"
"int64" : "sint64" # duplicate of "int64" : "int64"
"uint32": "fixed32" # duplicate of "uint32": "uint32"
"uint64": "fixed64" # duplicate of "uint64": "uint64"
"int32" : "sfixed32" # duplicate of "int32" (again)
"int64" : "sfixed64" # duplicate of "int64" (again)
Python silently uses the last definition, so "int32", "int64",
"uint32", "uint64" were all mapping to the sfixed*/fixed* variants,
not the plain protobuf types. Remove the duplicate entries.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Matt Jones <47545907+SoundMatt@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
type_translationdict inifex_to_protobuf.pydefined"int32","int64","uint32", and"uint64"twice each. Python silently uses the last value for any duplicate key, so those four IFEX types were being translated tosfixed32,sfixed64,fixed32, andfixed64respectively — not the plain protobufint32/int64/uint32/uint64types that were set in the first (correct) definitions.Remove the six duplicate entries.