-
Notifications
You must be signed in to change notification settings - Fork 270
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
Add TargetFile.custom() documentation when building readthedocs #1749
Conversation
Pull Request Test Coverage Report for Build 1663921369
💛 - Coveralls |
I managed to add the |
I realized I was mistaken about the |
tuf/api/metadata.py
Outdated
"""Contains additional information about the TargetFile instance""" | ||
return self.unrecognized_fields.get("custom") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By adding a docstring to the property RTD noticed custom
and documented it.
I wouldn't object to either. Specification (summarized by me):
Object is never defined but does seem to mean JSON object -- a dictionary with string keys -- so annotating it as such seems reasonable. There's probably no need for us to validate |
Dictionary.get() by default will return "None" if the key is not found as documented in: https://docs.python.org/3/library/stdtypes.html#dict.get This means we don't get anything by passing the default type. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
By adding a docstring to the property RTD noticed custom and documented it. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
@jku A valid json in python works for boolean and number strings as well, so in that case |
7cebbe2
to
0c97649
Compare
You are correct that |
Fixes #1602
Description of the changes being introduced by the pull request:
Add the missing
Targetfile.custom()
property to the RTD documentation.This property is not documented and is not visible in RTD documentation:
I think it would be useful to expose as the "supported" way for a client app to read custom metadata for a target.
Please verify and check that the pull request fulfills the following
requirements: