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
Hi there, just putting in a request for type annotation support for default/define statements as there's situations in my games where I default a variable to None, but later down the line, assign it to some complex type.
For example, a dictionary mapping strings to tuples of floats.
Under the current system I'd have to use a comment, which is okay, but it'd be nice if the syntax supported it directly, such as: default someVariable: dict[str, tuple[float, float]] | None = None
Thank you!
The text was updated successfully, but these errors were encountered:
Gouvernathor
changed the title
[Feature Request] - Add support for type annotations to default and define statements
Add support for type annotations to default and define statements
Sep 6, 2022
Hi there, just putting in a request for type annotation support for default/define statements as there's situations in my games where I
default
a variable toNone
, but later down the line, assign it to some complex type.For example, a dictionary mapping strings to tuples of floats.
Under the current system I'd have to use a comment, which is okay, but it'd be nice if the syntax supported it directly, such as:
default someVariable: dict[str, tuple[float, float]] | None = None
Thank you!
The text was updated successfully, but these errors were encountered: