Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for type annotations to default and define statements #3947

Open
multimokia opened this issue Sep 5, 2022 · 0 comments · May be fixed by #4541
Open

Add support for type annotations to default and define statements #3947

multimokia opened this issue Sep 5, 2022 · 0 comments · May be fixed by #4541
Labels
enhancement A proposed or requested enhancement or improvement to renpy's features.

Comments

@multimokia
Copy link
Contributor

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!

@Gouvernathor Gouvernathor added the enhancement A proposed or requested enhancement or improvement to renpy's features. label Sep 6, 2022
@Gouvernathor 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A proposed or requested enhancement or improvement to renpy's features.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants