Skip to content

Commit d6a3453

Browse files
rwbartongvanrossum
authored andcommitted
Sync typeshed and add regression test for #1430 (#1463)
1 parent 2f43c99 commit d6a3453

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

mypy/test/data/pythoneval.test

+5
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,11 @@ _program.py:9: error: Incompatible types in assignment
11071107
_program.py:19: error: List item 0 has incompatible type "Tuple[str, List[None]]"
11081108
_program.py:23: error: Invalid index type "str" for "dict"
11091109

1110+
[case testDictUpdateInference]
1111+
from typing import Dict, Optional
1112+
d = {} # type: Dict[str, Optional[int]]
1113+
d.update({str(i): None for i in range(4)})
1114+
11101115
[case testSuperAndSetattr]
11111116
class A:
11121117
def __init__(self) -> None:

0 commit comments

Comments
 (0)