Skip to content

Clarify inherited attribute docstrings#975

Open
bharatbushan03 wants to merge 1 commit into
google:gh-pagesfrom
bharatbushan03:clarify-inherited-attribute-docstrings
Open

Clarify inherited attribute docstrings#975
bharatbushan03 wants to merge 1 commit into
google:gh-pagesfrom
bharatbushan03:clarify-inherited-attribute-docstrings

Conversation

@bharatbushan03
Copy link
Copy Markdown

Summary

Resolves #925

This PR standardizes the documentation format for child classes that inherit attributes from parent classes.

Instead of duplicating the entire attribute description (which creates a maintenance burden) or using overly vague shortcuts (like "See parent"), this change implements an explicit, maintainable reference style:
[Attribute]: Inherited from :class:[ParentClass].

Changes

  • Updated docstrings in child classes to remove duplicated parent attribute descriptions.
  • Added explicit :class: cross-references pointing back to the parent class for all inherited attributes.
  • Ensured no functional code, logic, or existing docstring formatting styles were altered.

Rationale

Copy-pasting docstrings across multiple child classes scales poorly when arguments grow or change. By explicitly referencing the parent class, we keep the codebase maintainable while ensuring automated documentation tools (like Sphinx) can still track the inheritance seamlessly.

Verification Results

  • Documentation builds successfully without warnings.
  • Verified that no functional code or logic was modified.

@google-cla
Copy link
Copy Markdown

google-cla Bot commented May 18, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarifying inheritance of class documentation in python.

1 participant