-
-
Notifications
You must be signed in to change notification settings - Fork 21.9k
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
In make_rst.py, include the parent class in 'Inherits:' even if it is not known. #97337
Conversation
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.
This seems okay. I'm not sure who else can take a look at make_rst.py
, though, just to ensure it doesn't rarely behave weird occasionally.
I don't fully understand the change. If
Note that this is not a normal situation. If a class is exposed, its parent must be too. There should be no invalid or missing links to the parent class. |
I ran the tool against the current codebase, at least right now it doesn't do anything different. |
Yes, but we are talking about how the code should work in such a situation. You proposed reStructuredText generation for user docs and want to document the use of |
@dalexeev Maybe you misunderstand. This PR changes from the second picture to the first picture. Where before, you had an empty Inherits: part, with this PR you will at least have the name of the parent class, plus an error in the log. A better solution for |
By the way, NumDot Docs are not displayed correctly. Your classes are obviously not If Ideally, you should modify |
@dalexeev Yes, both are addressed in the latest versions of the docs: https://numdot.readthedocs.io/en/latest/classes/class_nd.html Basically i used the changes to
I agree, but this is out of scope for the near future. Just seeing the name of the parent is 'good enough' for 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.
Looks good to me. Thanks and sorry for the misunderstanding!1
Footnotes
-
I missed the text "With this PR," and that the pictures were in reverse order. To avoid such questions in the future, you could use "Before" and "After" captions. Please note that many contributors are not native English speakers. ↩
Yep, sorry. I agree this PR wouldn't make sense with the reverse changes. I'll structure it better next time! |
Thanks! |
With this PR, in the rare case that a parent class has not yet been documented, it will still appear in "Inherits:", as in:
This is related to godotengine/godot-proposals#10733: When the script is used for a gdextension codebase, the script will not be aware of the parent class. This mitigates the issue of an empty "Inherits:" notation (the current state):
Additionally, an error will now be printed through
make_type
, where this mistake was silently ignored before.