{{ message }}
Use different colour for 'Return value: Borrowed reference'#188
Merged
hugovk merged 2 commits intopython:mainfrom Apr 26, 2024
Merged
Use different colour for 'Return value: Borrowed reference'#188hugovk merged 2 commits intopython:mainfrom
hugovk merged 2 commits intopython:mainfrom
Conversation
Member
|
If you’re reusing existing colors, how about you centralize their definition as a CSS variables and then use it from both your new CSS rules and the old ones that originally defined the color? |
Member
Author
Member
Author
erlend-aasland
approved these changes
Apr 24, 2024
erlend-aasland
left a comment
There was a problem hiding this comment.
I don't have a strong opinion regarding naming, but I like the change! Personally, I would prefer borrowed references to be labelled as "bad", but that is a different discussion.
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.







Follow on from python/cpython#117926.
Currently light green is used for all return types:
For example: https://docs.python.org/3/c-api/exceptions.html
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.
This PR uses the same yellow/orange colour as the "Changed in version x.y" text in #185 - I've already checked the contrast ratios in that PR and both meet WCAG AAA. By using the same colour, it will be easier to check/change when we audit.
For example: https://python-docs-theme-previews--188.org.readthedocs.build/en/188/c-api/exceptions.html#querying-the-error-indicator