You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if documentation of attributes on PulpObject subclasses, and other attrs-based classes, was improved with respect to the type and default value of attributes.
is_sigstore = None
True if this is a sigstore repository, used for container image manifest signatures.
signing_keys = None
A list of GPG signing key IDs used to sign content in this repository.
Where:
the type of each attribute isn't clearly documented - it depends on the developer explicitly writing it in the doc string for the attribute (which can be easily forgotten)
every single attribute has this trailing "= None", which is useless - one might think it means the default value is None so it can be omitted from calls to the constructor, but actually it's displayed even for attributes which are mandatory to provide with a non-None value.
Desired behavior
Attribute docs don't have the useless "= None" suffix, and they display the attribute type and possibly even a default value in some standardized way.
For example:
is_sigstore: bool
True if this is a sigstore repository, used for container image manifest signatures.
signing_keys: List[str] = []
GPG signing key IDs used to sign content in this repository.
Use case
Allows developers to more clearly understand expected type of all attributes, and cuts down on useless noise in the docs.
The text was updated successfully, but these errors were encountered:
Summary
It would be nice if documentation of attributes on PulpObject subclasses, and other attrs-based classes, was improved with respect to the type and default value of attributes.
Issue Type
Current behavior
If I look at generated docs e.g. at https://release-engineering.github.io/pubtools-pulplib/api/model.html, I see attribute docs like this:
Where:
Desired behavior
Attribute docs don't have the useless "= None" suffix, and they display the attribute type and possibly even a default value in some standardized way.
For example:
Use case
Allows developers to more clearly understand expected type of all attributes, and cuts down on useless noise in the docs.
The text was updated successfully, but these errors were encountered: