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

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy