Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

bug: updates __eq__ comparison on TableConstraint#2274

Merged
chalmerlowe merged 5 commits intomainfrom
bug-fix-eq-error
Sep 3, 2025
Merged

bug: updates __eq__ comparison on TableConstraint#2274
chalmerlowe merged 5 commits intomainfrom
bug-fix-eq-error

Conversation

@chalmerlowe
Copy link
Copy Markdown
Collaborator

@chalmerlowe chalmerlowe commented Sep 3, 2025

Fixes the __eq__() dunder method on TableConstraints.
Previously it would give incorrect results (e.g. a return value of None instead of False)

  • Shifts the parentheses to ensure that the correct comparisons are being done.

Fixes #2263 🦕

@chalmerlowe chalmerlowe requested a review from a team September 3, 2025 13:09
@chalmerlowe chalmerlowe requested a review from a team as a code owner September 3, 2025 13:09
@product-auto-label product-auto-label bot added the size: xs Pull request size is extra small. label Sep 3, 2025
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/python-bigquery API. label Sep 3, 2025
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: xs Pull request size is extra small. labels Sep 3, 2025
Copy link
Copy Markdown

@iennae iennae left a comment

Choose a reason for hiding this comment

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

LTGM; subtle logic issue and the improved tests would catch this problem and fully test edge cases. Thanks!

@chalmerlowe chalmerlowe merged commit 435ecdb into main Sep 3, 2025
28 checks passed
@chalmerlowe chalmerlowe deleted the bug-fix-eq-error branch September 3, 2025 18:30
@chalmerlowe
Copy link
Copy Markdown
Collaborator Author

Fixes #2174

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

Labels

api: bigquery Issues related to the googleapis/python-bigquery API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TableConstraints __eq__ is not comprehensive

4 participants