Skip to content

Respect hash-equivalent literals in iteration-over-set#14063

Merged
charliermarsh merged 1 commit intomainfrom
charlie/hash-eq
Nov 3, 2024
Merged

Respect hash-equivalent literals in iteration-over-set#14063
charliermarsh merged 1 commit intomainfrom
charlie/hash-eq

Conversation

@charliermarsh
Copy link
Member

Summary

Closes #14049.

@charliermarsh charliermarsh added the bug Something isn't working label Nov 3, 2024
@charliermarsh charliermarsh marked this pull request as ready for review November 3, 2024 18:06
@charliermarsh charliermarsh force-pushed the charlie/hash-eq branch 2 times, most recently from 44402e2 to b37c449 Compare November 3, 2024 18:07
@diceroll123
Copy link
Contributor

Welcome back, HashableExpr!

@charliermarsh
Copy link
Member Author

New HashableExpr just dropped

@charliermarsh
Copy link
Member Author

Ah wait this doesn't work for tuples.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2024

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

✅ ecosystem check detected no format changes.

Formatter (preview)

✅ ecosystem check detected no format changes.

@charliermarsh charliermarsh enabled auto-merge (squash) November 3, 2024 18:40
@charliermarsh charliermarsh merged commit e00594e into main Nov 3, 2024
@charliermarsh charliermarsh deleted the charlie/hash-eq branch November 3, 2024 18:44
charliermarsh added a commit that referenced this pull request Nov 3, 2024
## Summary

Like #14063, but ensures that we
catch cases like `{1, True}` in which the items hash to the same value
despite not being identical.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PLC0208 false positive when a set contains equal values of different types

2 participants