Skip to content

Support equality for Styles#38

Merged
JoshKarpel merged 1 commit intomainfrom
style-equality
Mar 1, 2026
Merged

Support equality for Styles#38
JoshKarpel merged 1 commit intomainfrom
style-equality

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 05:37
Copilot AI review requested due to automatic review settings March 1, 2026 05:37
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

Adds Python-side value equality support for waxy.Style so ==/!= compare style contents instead of object identity.

Changes:

  • Implement Style.__eq__ in the Rust #[pyclass] wrapper by comparing the underlying taffy::Style.
  • Add test coverage for Style equality (default, same fields, differing fields, non-Style comparisons).
  • Update the Python stub (.pyi) and changelog to reflect the new API behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
tests/test_style.py Adds unit tests validating Style equality/inequality behavior.
src/style.rs Implements __eq__ for Style by delegating to taffy::Style equality.
python/waxy/init.pyi Exposes Style.__eq__ in type stubs.
docs/changelog.md Documents the new Style equality feature.

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

@JoshKarpel JoshKarpel merged commit daa4a5b into main Mar 1, 2026
10 checks passed
@JoshKarpel JoshKarpel deleted the style-equality branch March 1, 2026 05:43
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