-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Clarify Array class methods that return error #80936
Conversation
In my opinion the description for insert and resize should mention that the return value is an |
The specification isn't needed IMO, "a value" and "an array" are equally true and we want to keep changes to the docks for non-critical reasons to a minimum |
Well, I think it's bad that it says that nothing/no value is returned when actually an integer is returned. If the note was removed and instead the description said that an error (or an integer equaling an error) is returned it would also be clear. |
My bad that is true, then it should be changed to indicate that a error value is returned |
41c77ea
to
e8149d8
Compare
Would be good to look into why the |
e8149d8
to
9f09ed0
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.
LGTM now!
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.
Other than that nitpick LGTM
9f09ed0
to
d8e7ce5
Compare
Should those array functions that return a int/Error show the return value as Error in the docs like it is here godot/doc/classes/ConfigFile.xml Line 160 in 6758a7f
|
It should but it can't, see my comment above |
well, for Array it is only |
The problem is that the generation system for documentation doesn't detect metadata and decorations for arguments and return values, I am aware of the difference, that's why I pointed this issue out, it's related to low level code |
Even with the return type fixed, it never hurts to be explicit in the description about what the method takes and returns. So for now fixing the docs would be fine. |
Thanks! And congrats on your first merged Godot PR! |
Marked for cherry picking as I believe the doc changes apply to 4.1 as well and clarify things |
I think we can skip cherry-picking this one. |
insert now returns an Error value so the note had to be changed. only needs to apply for 4.x I believe
perhaps the note can be removed altogether