Skip to content

Conversation

@weinbe58
Copy link
Member

@weinbe58 weinbe58 commented Jul 18, 2025

Implement a specific equality. For sub-grid I treat it as a Grid object, so I use the parent equality.

@weinbe58 weinbe58 requested a review from Copilot July 18, 2025 14:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug with object hashing by implementing proper equality and hash methods for Grid classes. The changes replace identity-based hashing with value-based hashing to ensure objects with the same properties are considered equal and have the same hash.

  • Implements __hash__() and __eq__() methods for the Grid class based on object properties
  • Updates SubGrid class to use parent class equality and hash methods instead of identity-based hashing

@weinbe58 weinbe58 added backport 0.1 backport 0.2 backport to 0.2.* labels Jul 19, 2025
@weinbe58 weinbe58 merged commit 285d939 into main Jul 19, 2025
10 checks passed
@weinbe58 weinbe58 deleted the phil/fix-hashing-condition branch July 19, 2025 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants