Skip to content

Comments

refactor: Decorator to take docs rather than inheritance#2467

Merged
TrevorBergeron merged 6 commits intomainfrom
no_inherited_methods
Feb 19, 2026
Merged

refactor: Decorator to take docs rather than inheritance#2467
TrevorBergeron merged 6 commits intomainfrom
no_inherited_methods

Conversation

@TrevorBergeron
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Feb 18, 2026
@TrevorBergeron TrevorBergeron marked this pull request as ready for review February 18, 2026 23:35
@TrevorBergeron TrevorBergeron requested a review from a team as a code owner February 18, 2026 23:35
@TrevorBergeron TrevorBergeron requested a review from sycai February 19, 2026 18:09
Comment on lines +23 to +35
if not target_class.__doc__ and source_class.__doc__:
target_class.__doc__ = source_class.__doc__

for name, source_item in vars(source_class).items():
if name in vars(target_class):
target_item = getattr(target_class, name)

if hasattr(target_item, "__doc__") and not target_item.__doc__:
if hasattr(source_item, "__doc__") and source_item.__doc__:
try:
target_item.__doc__ = source_item.__doc__
except AttributeError:
pass
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to raise an error if both the target and the source have docs, assuming that all the docs should be placed in that vendored directory?

@TrevorBergeron TrevorBergeron merged commit 0f1ac1a into main Feb 19, 2026
19 of 24 checks passed
@TrevorBergeron TrevorBergeron deleted the no_inherited_methods branch February 19, 2026 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants