Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tswast merged 45 commits intomainfromshuowei-anywidget-remove-len-call
Oct 27, 2025

Conversation

@shuoweil
Copy link
Contributor

@shuoweilshuoweil commentedJul 24, 2025
edited
Loading

This PR introduces enhancements to theTableWidget by improving its initialization and robustness, specifically addressing anAttributeError related to the_batches attribute.

Key improvements include:
Enhanced Initialization: Ensures the_batches attribute is correctly initialized in theTableWidget constructor by calling_reset_batches_for_new_page_size before it is accessed, making the widget more reliable from creation.
Improved Typing: Added explicit type hints for_batches to resolve MyPy errors, contributing to better code clarity and maintainability.
Refactored Batch Handling: Changed theto_pandas_batches call to the internal_to_pandas_batches to ensure the correctPandasBatches object 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.

@shuoweilshuoweil self-assigned thisJul 24, 2025
@shuoweilshuoweil requested review froma team ascode ownersJuly 24, 2025 23:22
@shuoweilshuoweil requested a review fromGarrettWuJuly 24, 2025 23:22
@review-notebook-app
Copy link

Check out this pull request on ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered byReviewNB

@product-auto-labelproduct-auto-labelbot added size: mPull request size is medium. api: bigqueryIssues related to the googleapis/python-bigquery-dataframes API. labelsJul 24, 2025
@shuoweilshuoweil requested review fromtswast and removed request forGarrettWuJuly 24, 2025 23:23
@shuoweilshuoweilforce-pushed theshuowei-anywidget-remove-len-call branch fromaee37a7 to303c4afCompareJuly 24, 2025 23:23
@tswast
Copy link
Collaborator

Please also update the benchmarks to use thetotal_rows parameter.

@shuoweilshuoweilforce-pushed theshuowei-anywidget-remove-len-call branch fromfc38cf3 tof643cfbCompareJuly 30, 2025 03:28
@shuoweil
Copy link
ContributorAuthor

shuoweil commentedJul 30, 2025
edited
Loading

Please also update the benchmarks to use thetotal_rows parameter.

Let's use a separate PR for this request.#1949

tswast reacted with thumbs down emoji

@shuoweilshuoweil requested a review fromtswastJuly 30, 2025 03:29
@shuoweilshuoweilforce-pushed theshuowei-anywidget-remove-len-call branch 2 times, most recently frome12c8ff tof8ab27bCompareJuly 30, 2025 22:07
@shuoweilshuoweil added the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelJul 31, 2025
@bigframes-botbigframes-bot removed the kokoro:force-runAdd this label to force Kokoro to re-run the tests. labelJul 31, 2025
@shuoweilshuoweilforce-pushed theshuowei-anywidget-remove-len-call branch fromf8ab27b todf85824CompareJuly 31, 2025 04:32
@shuoweilshuoweilforce-pushed theshuowei-anywidget-remove-len-call branch fromdf85824 to2756968CompareAugust 1, 2025 08:06
@shuoweilshuoweil requested a review fromtswastAugust 1, 2025 08:07
@shuoweilshuoweilforce-pushed theshuowei-anywidget-remove-len-call branch 7 times, most recently from5bc65ce to26eb25eCompareAugust 9, 2025 00:18
- 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.
@shuoweilshuoweilforce-pushed theshuowei-anywidget-remove-len-call branch from42e0580 to76cdec6CompareOctober 24, 2025 21:20
@shuoweilshuoweil requested a review fromtswastOctober 24, 2025 21:22
@shuoweilshuoweil changed the titlefeat: Resolve AttributeError in TableWidget and improve initializationfix: Resolve AttributeError in TableWidget and improve initializationOct 27, 2025
@tswasttswast merged commit4c4c9b1 intomainOct 27, 2025
25 checks passed
@tswasttswast deleted the shuowei-anywidget-remove-len-call branchOctober 27, 2025 19:30
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tswasttswasttswast approved these changes

@TrevorBergeronTrevorBergeronAwaiting requested review from TrevorBergeron

Assignees

@shuoweilshuoweil

Labels

api: bigqueryIssues related to the googleapis/python-bigquery-dataframes API.size: lPull request size is large.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@shuoweil@tswast@bigframes-bot

[8]ページ先頭

©2009-2025 Movatter.jp