Allow TypedDict assignment of Required item to NotRequired ReadOnly item by brianschubert · Pull Request #18164 · python/mypy (original) (raw)

With this, mypy passes the typeddicts_readonly_consistency conformance tests 🎉

diff --git a/conformance/results/mypy/typeddicts_readonly_consistency.toml b/conformance/results/mypy/typeddicts_readonly_consistency.toml index ea01b2d..cff41c9 100644 --- a/conformance/results/mypy/typeddicts_readonly_consistency.toml +++ b/conformance/results/mypy/typeddicts_readonly_consistency.toml @@ -6,13 +6,11 @@ output = """ typeddicts_readonly_consistency.py:37: error: Incompatible types in assignment (expression has type "A1", variable has type "B1") [assignment] typeddicts_readonly_consistency.py:38: error: Incompatible types in assignment (expression has type "C1", variable has type "B1") [assignment] typeddicts_readonly_consistency.py:40: error: Incompatible types in assignment (expression has type "A1", variable has type "C1") [assignment] -typeddicts_readonly_consistency.py:79: error: Incompatible types in assignment (expression has type "C2", variable has type "A2") [assignment] typeddicts_readonly_consistency.py:81: error: Incompatible types in assignment (expression has type "A2", variable has type "B2") [assignment] typeddicts_readonly_consistency.py:82: error: Incompatible types in assignment (expression has type "C2", variable has type "B2") [assignment] typeddicts_readonly_consistency.py:84: error: Incompatible types in assignment (expression has type "A2", variable has type "C2") [assignment] typeddicts_readonly_consistency.py:85: error: Incompatible types in assignment (expression has type "B2", variable has type "C2") [assignment] """ -conformance_automated = "Fail" +conformance_automated = "Pass" errors_diff = """ -Line 79: Unexpected errors ['typeddicts_readonly_consistency.py:79: error: Incompatible types in assignment (expression has type "C2", variable has type "A2") [assignment]'] """ diff --git a/conformance/results/mypy/version.toml b/conformance/results/mypy/version.toml index bdefc8c..7aa48eb 100644 --- a/conformance/results/mypy/version.toml +++ b/conformance/results/mypy/version.toml @@ -1,2 +1,2 @@ -version = "mypy 1.13.0" -test_duration = 2.7 +version = "mypy 1.14.0+dev.4e88ddb672cd5eef3be48cf8bbfe641969b860ac" +test_duration = 4.7