Return NotImplemented for unsupported comparisons by RazerM · Pull Request #5547 · plotly/plotly.py
Link to issue
Closes #5546
Description of change
Updated the __eq__ implementations to return NotImplemented instead of False when comparing against an unsupported type. This aligns with Python's data model and allows the other operand to handle the comparison.
Demo
N/A
Testing strategy
Additional information (optional)
https://docs.python.org/3.14/reference/datamodel.html#object.__eq__
Guidelines
- I have reviewed the pull request guidelines and the Code of Conduct and confirm that this PR follows them.
- I have added an entry to the changelog if needed (not required for documentation PRs).