-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Added section on common unsafe operations and their safe counterparts #8654
Conversation
b034294
to
a9d6337
Compare
a9d6337
to
5563b1d
Compare
Nice PR! I would add though some subtitles for each error, making it easy to understand which part applies to which error. |
Thanks! I'm new to Sphinx / reST so I don't know if 'subtitles' hints at special reST markup or whether you're using subtitles figuratively ;) Perhaps you could give an example and I'll elaborate on the errors in the PR. |
Subsections, which are done with |
5563b1d
to
f98b6f9
Compare
Ah, those kinds of subtitles! Added them. |
f98b6f9
to
b8be48d
Compare
I just pushed a slightly more elaborate description of the examples, and changed the 'fix' of the second example. The old fix would work to get rid of the warning, but would lead to an error at runtime if the object would not be of the type it was casted into. |
b8be48d
to
0b19ec0
Compare
Thanks for the review @dalexeev – made all the changes you requested, as well as reordered the two examples, and added |
0b19ec0
to
4975792
Compare
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.
@AdriaandeJongh Sorry for the delay and thanks for your patience! I found no factual errors, my comments contain only additions and style suggestions. @AThousandShips Could you please check the grammar and wording?
4975792
to
90643ab
Compare
No worries about the delay – I presume you're drowned in coding yourself and reviewing PRs and whatnot! I appreciate the thorough review. Latest commit is ready for final grammar / style check by @AThousandShips. |
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.
Wording and grammar is good
90643ab
to
648388e
Compare
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.
Looks good to me.
Awesome contribution, thanks for taking the time to add these docs. Also thanks everyone for the reviews! Merged. :) |
Added section on common unsafe operations and their safe counterparts
Cherry-picked to 4.2. |
In trying to learn typed GDScript and enabling all the advanced warnings, I found that there was no guidance anywhere in the docs on how to actually fix those warnings. This is a first attempt at that.