-
Notifications
You must be signed in to change notification settings - Fork 63
fix: Resolve AttributeError in TableWidget and improve initialization #1937
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
Merged
Conversation
This 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
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
aee37a7 to
303c4af
Compare
tswast
reviewed
Jul 25, 2025
Collaborator
|
Please also update the benchmarks to use the |
fc38cf3 to
f643cfb
Compare
Contributor
Author
Let's use a separate PR for this request. #1949 |
e12c8ff to
f8ab27b
Compare
f8ab27b to
df85824
Compare
tswast
reviewed
Jul 31, 2025
df85824 to
2756968
Compare
5bc65ce to
26eb25e
Compare
- Reinstated 'Iterator[pd.DataFrame]' inheritance for 'PandasBatches' in 'bigframes/core/blocks.py'. - Removed internal type hint 'bigframes.core.blocks.PandasBatches:' from 'to_pandas_batches' docstring in 'bigframes/dataframe.py' to avoid exposing internal types in public documentation.
This reverts the import path for the benchmark utils to 'benchmark.utils' to address concerns about google3 imports.
42e0580 to
76cdec6
Compare
tswast
approved these changes
Oct 27, 2025
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces enhancements to the
TableWidgetby improving its initialization and robustness, specifically addressing anAttributeErrorrelated to the_batchesattribute.Key improvements include:
Enhanced Initialization: Ensures the
_batchesattribute is correctly initialized in theTableWidgetconstructor by calling_reset_batches_for_new_page_sizebefore it is accessed, making the widget more reliable from creation.Improved Typing: Added explicit type hints for
_batchesto resolve MyPy errors, contributing to better code clarity and maintainability.Refactored Batch Handling: Changed the
to_pandas_batchescall to the internal_to_pandas_batchesto ensure the correctPandasBatchesobject is returned, satisfying type requirements and streamlining internal data handling.Test Enhancements: Added new tests to verify the widget's row count is immutable after creation and that it gracefully handles cases with invalid total rows, ensuring the stability of the new functionality.