Metadata API: Provide type as well as _type#1376
Merged
joshuagl merged 1 commit intotheupdateframework:developfrom May 10, 2021
Merged
Metadata API: Provide type as well as _type#1376joshuagl merged 1 commit intotheupdateframework:developfrom
joshuagl merged 1 commit intotheupdateframework:developfrom
Conversation
f5599c3 to
b77d6da
Compare
Using Metadata APIs '_type' attribute (from outside metadata.py) currently results in linter errors. Add a duplicate 'type': this way the API users can avoid linter errors but '_type' is still available in case the strict file format compatibility is needed. Fixes theupdateframework#1375 Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
b77d6da to
85971be
Compare
MVrachev
approved these changes
May 10, 2021
Collaborator
MVrachev
left a comment
There was a problem hiding this comment.
Given that _type is read-only that's okay.
LGTM!
joshuagl
approved these changes
May 10, 2021
Member
joshuagl
left a comment
There was a problem hiding this comment.
This seems reasonable as a convenience API to avoid having to disable classes of linter warnings.
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.
Using Metadata APIs '_type' attribute (from outside metadata.py) currently
results in linter errors.
Add a duplicate 'type': this way the API users can avoid linter errors
but '_type' is still available in case the strict file format
compatibility is needed.
Fixes #1375
Signed-off-by: Jussi Kukkonen jkukkonen@vmware.com
I think the only alternative to this that I would consider acceptable is just replacing
_typewithtype.