Bug Report
Report requested from #20726 (comment)
To Reproduce
from collections.abc import Mapping
x: Mapping[str, str]
assert x == {"a": "b"}
x["a"] = "foo"
Expected Behavior
mypy 1.19 produces an index error.
mypy 1.20 seems to incorrectly narrow the type to a dict and then allows the assignment, which may not actually work.
Bug Report
Report requested from #20726 (comment)
To Reproduce
Expected Behavior
mypy 1.19 produces an index error.
mypy 1.20 seems to incorrectly narrow the type to a dict and then allows the assignment, which may not actually work.