void () { doTestByText(""" from typing import TypedDict, Optional class Movie(TypedDict): name: str year: Optional[int] class Horror(Movie, total=False): based_on_book: bool m = Horror(name='Alien', year=1979) d={'name':'Garden State', 'year':2004} m.update(d) m.update({'name':'Garden State', 'year':<warning descr="Expected type 'int | None', got 'str' instead">'2004'</warning>, <warning descr="TypedDict \\"Horror\\" cannot have key 'based_on'">'based_on'</warning>: 'book'}) m.update(name=<warning descr="Expected type 'str', got 'int' instead">1984</warning>, year=1984, based_on_book=<warning descr="Expected type 'bool', got 'str' instead">'yes'</warning>) m.update([('name',<warning descr="Expected type 'str', got 'int' instead">1984</warning>), ('year',None)])"""); }