Skip to content

bytes in bytearray containment wrongly flagged by strict equality #7465

@benjaminp

Description

@benjaminp
$ mypy --version
mypy 0.730+dev.63380783f032ee17c8cf0560dd81cf734bf36103
$ cat example.py
print(b'hi' in bytearray(b'hi'))
$ python3 example.py
True
$ python2 example.py
True
$ mypy example.py --strict-equality
example.py:1: error: Non-overlapping container check (element type: "bytes", container item type: "int")
Found 1 error in 1 file (checked 1 source file)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions