Skip to content

Make Point hashable#36

Merged
JoshKarpel merged 4 commits intomainfrom
hashable-point
Mar 1, 2026
Merged

Make Point hashable#36
JoshKarpel merged 4 commits intomainfrom
hashable-point

Conversation

@JoshKarpel
Copy link
Copy Markdown
Owner

No description provided.

@JoshKarpel JoshKarpel self-assigned this Mar 1, 2026
@JoshKarpel JoshKarpel marked this pull request as ready for review March 1, 2026 02:26
Copilot AI review requested due to automatic review settings March 1, 2026 02:26
Copy link
Copy Markdown
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 makes waxy.Point hashable in the Python API, enabling its use in hashed containers like set/dict, and adds a basic regression test plus a typing stub update.

Changes:

  • Add a Point.__hash__ implementation in the Rust/PyO3 binding.
  • Add a Python test validating hashing and set deduplication for Point.
  • Update the Python type stubs to declare Point.__hash__.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tests/test_geometry.py Adds a new test asserting Point hashing works and supports set deduplication.
src/geometry.rs Implements Point.__hash__ for the PyO3-exposed Point type.
python/waxy/init.pyi Adds __hash__ to the Point stub to reflect the new runtime behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
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

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JoshKarpel JoshKarpel enabled auto-merge (squash) March 1, 2026 05:10
@JoshKarpel JoshKarpel merged commit 3127323 into main Mar 1, 2026
6 checks passed
@JoshKarpel JoshKarpel deleted the hashable-point branch March 1, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants