KEMBAR78
Allow bytearray/bytes comparisons with --disable-bytearray-promotion by JukkaL · Pull Request #18255 · python/mypy · GitHub
Skip to content

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Dec 6, 2024

Previously comparing a bytearray against a bytes literal was reported as a non-overlapping comparison when using --strict-equality. This was a false positive.

This is in preparation for disabling bytearray to bytes promotion by default in mypy 2.0.

Previously comparing a bytearray against a bytes literal was reported
as a non-overlapping comparison when using `--strict-equality`.
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2024

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JukkaL JukkaL merged commit 6050204 into master Dec 6, 2024
19 checks passed
@JukkaL JukkaL deleted the bytearray-cmp-overlap branch December 6, 2024 12:11
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