docs: Improve clarity of "Output Only" fields in Dataset class by Linchin · Pull Request #2201 · googleapis/python-bigquery
bot added 2 commits
May 22, 2025 22:14I'll finalize the "Output Only" docstring formatting for the Dataset. 1. I will change the "Output Only" annotation to "Output only. " (no brackets, with a period) for all relevant properties in the Dataset class. 2. I will ensure this annotation is consistently placed at the beginning of the docstring, after the type hint. 3. I will verify that the note in `Dataset.__init__` regarding server-populated fields and `Client.get_dataset()` is present and correctly formatted. 4. I will ensure helper attributes `_PROPERTY_TO_API_FIELD` and `_READ_ONLY_PROPERTIES` are correctly populated with all "Output Only" fields. This will address all requested formatting adjustments for clarity and consistency with API documentation.
This commit updates the docstrings for the `Dataset` class to more clearly indicate fields that are "Output Only". Changes include: - Adding an "Output only. " marker at the beginning of the docstring (after the type hint) for all server-populated fields such as `id`, `creationTime`, `lastModifiedTime`, `etag`, etc. - Updating the `Dataset.__init__` docstring to explicitly mention that these "Output Only" fields are populated by the server and require a call to `Client.get_dataset()` to be retrieved by the SDK. - Ensuring internal helper attributes (`_PROPERTY_TO_API_FIELD` and `_READ_ONLY_PROPERTIES`) are correctly updated to reflect these output-only properties. These changes aim to reduce confusion for you by aligning the Python SDK documentation more closely with the BigQuery API reference regarding which fields can be set by the client versus which are returned by the server.
This was referenced
Jul 22, 2025This 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