| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The type has a custom __eq__: https://github.com/python/cpython/blob/v3.11.1/Objects/descrobject.c#L1906 This helps fix this mypy false positive when using `--strict-equality`: ``` from types import MappingProxyType p = MappingProxyType({'x': 1}) d = {'x': 1} print(p == d) # error: Non-overlapping equality check ``` The fragment prints `True` so the comparison is valid.
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Sorry, something went wrong.
The second parameter is positional-only (I missed this when reviewing #9580)
| Back | FazBrowse Home | New Git URL |
The type has a custom rich comparison function:
https://github.com/python/cpython/blob/v3.11.1/Objects/descrobject.c#L1906
This helps fix this mypy false positive when using --strict-equality:
from types import MappingProxyType p = MappingProxyType({'x': 1}) d = {'x': 1} print(p == d) # error: Non-overlapping equality checkThe fragment prints True so the comparison is valid.