Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Docs: Add classes to C API return value annotations#117926
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
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.
👍
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Thanks@hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
(cherry picked from commit3284b84)Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
GH-117937 is a backport of this pull request to the3.12 branch. |
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Step two:python/python-docs-theme#188 |
Uh oh!
There was an error while loading.Please reload this page.
Currently light green is used for all return types
For example:https://docs.python.org/3/c-api/exceptions.html
Screenshots
A borrowed reference is not necessarily a "bad" thing, but we may want to use something other than green that indicates it's "good", to indicate they should be treated with care.
One option is yellow.
These annotations are added in
Doc/tools/extensions/c_annotations.py
. The first step is to add CSS classes in this file.The light green colour is defined inhttps://github.com/python/python-docs-theme. The second step is to adjust the colours in the theme.
This PR also includes some light cleanup whilst we're touching this file, see commits.
📚 Documentation preview 📚:https://cpython-previews--117926.org.readthedocs.build/