-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Feature
stubgen should generate proper TypedDict
definition for a TypedDict
declared with the alternative syntax.
Pitch
Currently the type of a TypedDict
defined with the alternative syntax is generated as Incomplete
meaning the typing information is lost in the stub. Consider this example .py
file:
from typing import TypedDict
class TDClass(TypedDict):
x: int
y: str
TDAlt = TypedDict("TD", {"x": int, "y": str})
stubgen now generates:
from _typeshed import Incomplete
from typing import TypedDict
class TDClass(TypedDict):
x: int
y: str
TDAlt: Incomplete