Skip to content
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

first attribute of many proto types is not rendered properly #978

Closed
tswast opened this issue Aug 23, 2021 · 2 comments · Fixed by #1004
Closed

first attribute of many proto types is not rendered properly #978

tswast opened this issue Aug 23, 2021 · 2 comments · Fixed by #1004
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@tswast
Copy link

tswast commented Aug 23, 2021

I'm noticing that often the very first attribute of a proto type is not rendered properly.

image

https://googleapis.dev/python/bigquerystorage/latest/bigquery_storage_v1beta2/types.html#google.cloud.bigquery_storage_v1beta2.types.AppendRowsResponse.AppendResult

When I look at the source proto, I don't see anything obviously wrong with the formatting there.

https://github.com/googleapis/googleapis/blob/68e5bf3045d7b3ef55f473494a0cd4566491f899/google/cloud/bigquery/storage/v1beta2/storage.proto#L412

But looking at the generated docstring, it's clear that we're missing whitespace between the overall type description and the list of attributes.

https://github.com/googleapis/python-bigquery-storage/blob/d169db3f055d903b25c3aea047ea7d2d58056105/google/cloud/bigquery_storage_v1beta2/types/storage.py#L321-L330

@tswast tswast added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Aug 23, 2021
@tswast
Copy link
Author

tswast commented Aug 23, 2021

I think this is the relevant template:

r"""{{ message.meta.doc|rst(indent=4) }}{% if message.fields|length %}
Attributes:
{% for field in message.fields.values() %}
{{ field.name }} ({{ field.ident.sphinx }}):
{{ field.meta.doc|rst(indent=12, nl=False) }}
{% endfor %}
{% endif %}

I thought perhaps that it might just affect nested types, but it does also appear to affect module-level messages.

image

https://googleapis.dev/python/bigquerystorage/latest/bigquery_storage_v1beta2/types.html#google.cloud.bigquery_storage_v1beta2.types.AvroRows

https://github.com/googleapis/python-bigquery-storage/blob/d169db3f055d903b25c3aea047ea7d2d58056105/google/cloud/bigquery_storage_v1beta2/types/avro.py#L36-L41

@tswast
Copy link
Author

tswast commented Aug 23, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants