You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Alias of a TypedDict not recognized as a TypedDict base #18851
When a base TypedDict is defined in sys.version_info branches, mypy does not pick it as a proper TypedDict base.
To Reproduce
fromtypingimportRequired, TypedDictclassBase(TypedDict):
foo: intBestBase=BaseclassChild(BestBase):
baz: Required[int] # E: Required[] can be only used in a TypedDict definition
changed the title [-]TypedDict defined in `sys.version_info` guards is not recognized as a TypedDict base[/-][+]Alias of a TypedDict not recognized as a TypedDict base[/+]on Mar 29, 2025
Activity
[-]TypedDict defined in `sys.version_info` guards is not recognized as a TypedDict base[/-][+]Alias of a TypedDict not recognized as a TypedDict base[/+]