-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Updated GDScript code from dynamic type to static type #11264
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
base: master
Are you sure you want to change the base?
Conversation
Refactored GDScript code for full static typing compliance
This PR is a small contribution related to #6295. |
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Co-authored-by: A Thousand Ships <[email protected]>
Resolved all the suggestions
Thank you for mentioning the mistakes. Will not repeat such style-related issues. |
There is an issue with the Turning Around part of this page for the readers. |
All suggested changes resolved, please re-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me.
However, I'm not sure if we should add type hints only on this particular parge of the step-by-step tutorial. We should make sure all the step-by-step tutorials (script, 2D, 3D) feature type hints for consistency, as inconsistencies in this regard are likely to confuse beginners. See this issue: #11037
I still agree we should move all tutorials to use type hints in the long run, but we should make sure to do this in chunks that look logical to readers.
Thank you for adding the labels. I’ll proceed with the remaining pages in the getting-started section and look forward to further contributions from the community. |
Refactored GDScript code for full static typing compliance
In the docs, the GDScript code is dynamically type casted as
var foo = 12
.I did static type casting for the GDScript code as
var foo : int = 12
.Completely refactored the code as mentioned above and also added necessary statements explaining the static types used.