Docstrings do not specify which fields are one-ofs #713
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
🚨
This issue needs some love.
type: docs
Improvement to the documentation for an API.
It is not currently possibly to tell that a field is part of a one-of by just looking at the docstring.
Example:
https://github.com/googleapis/python-dlp/blob/4f3148e93ec3dfc9395aa38a3afc62498500a055/google/cloud/dlp_v2/types/dlp.py#L3740-L3761
All of the above fields are part of a one-of 'action'.
https://github.com/googleapis/python-dlp/blob/4f3148e93ec3dfc9395aa38a3afc62498500a055/google/cloud/dlp_v2/types/dlp.py#L3837-L3862
This can lead to confusing behavior when the developer tries to (1) set multiple fields in the constructor or (2) sets multiple fields in multiple calls. In both cases only the last field is preserved.
Follow up to googleapis/proto-plus-python#170
The text was updated successfully, but these errors were encountered: