fix: Edge.__eq__ checks isinstance(other, Edge) not Node#1593
Conversation
Edge equality was always False when comparing two Edge instances because the type guard checked for Node instead of Edge. This meant deduplication, set membership, and any equality check between edges silently failed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
I have read the CLA Document and I hereby sign the CLA behalf on myself, e-mail: example@example.com or I have read the CLA Document and I hereby sign the CLA behalf of my company, e-mail: example@example.com Signature is valid for 6 months. This bot will be retriggered when the Contributor License Agreement comment has been provided. Posted by the CLA Assistant Lite bot. |
|
I have read the CLA Document and I hereby sign the CLA behalf on myself, e-mail: totto@exoreaction.com |
What
Edge.__eq__compared the other object againstNodeinstead ofEdge, making edge equality always returnFalsewhen comparing two edges.Why it matters
Any code that deduplicates, checks membership in a set, or compares edges directly silently fails. For example:
Fix
One character:
Node→Edgein theisinstancecheck.Test