void () { runWithLanguageLevel(LanguageLevel.getLatest(), () -> doTestByText(""" from typing import TypedDict from typing_extensions import Required, NotRequired class WithTotalFalse(TypedDict, total=False): x: Required[int] class WithTotalTrue(TypedDict, total=True): x: NotRequired[int] class WithoutTotal(TypedDict): x: NotRequired[int] class WithoutTotalWithExplicitRequired(TypedDict): x: Required[int] y: NotRequired[int] AlternativeSyntax = TypedDict("AlternativeSyntax", {'x': NotRequired[int]}) with_total_false: WithTotalFalse = <warning descr="TypedDict 'WithTotalFalse' has missing key: 'x'">{}</warning> with_total_true: WithTotalTrue = {} without_total: WithoutTotal = {} without_total_with_explicit_required: WithoutTotalWithExplicitRequired = <warning descr="TypedDict 'WithoutTotalWithExplicitRequired' has missing key: 'x'">{}</warning> alternative_syntax: AlternativeSyntax = {} """)); }