Skip to content

--strict-equality prohibits a valid check b'abc' in b'cde' #6608

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ilevkivskyi opened this issue Apr 1, 2019 · 0 comments · Fixed by #6674
Closed

--strict-equality prohibits a valid check b'abc' in b'cde' #6608

ilevkivskyi opened this issue Apr 1, 2019 · 0 comments · Fixed by #6674
Labels
bug mypy got something wrong false-positive mypy gave an error on correct code priority-1-normal

Comments

@ilevkivskyi
Copy link
Member

Checks like b'abc' in b'cde' can potentially return True, but they are flagged as always false by --strict-equality. This is because bytes is a subclass of Sequence[int]. We should probably simply special-case this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug mypy got something wrong false-positive mypy gave an error on correct code priority-1-normal
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant