Skip to content

gh-148330: Add docstrings to module colorsys in all functions#148332

Open
aiwonderland wants to merge 1 commit intopython:mainfrom
aiwonderland:doc-colorsys-add-docstrings
Open

gh-148330: Add docstrings to module colorsys in all functions#148332
aiwonderland wants to merge 1 commit intopython:mainfrom
aiwonderland:doc-colorsys-add-docstrings

Conversation

@aiwonderland
Copy link
Copy Markdown

@aiwonderland aiwonderland commented Apr 10, 2026

gh-148330: colorsys: Add docstrings to module and all functions

Add module-level __doc__ and consistent docstrings to all colorsys conversion functions.
Fixes help() output for colorsys APIs and follows standard library style.

@python-cla-bot
Copy link
Copy Markdown

The following commit authors need to sign the Contributor License Agreement:

CLA not signed

@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 10, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@aiwonderland aiwonderland force-pushed the doc-colorsys-add-docstrings branch from 4a1a16c to 5209a13 Compare April 10, 2026 13:39
@bedevere-app
Copy link
Copy Markdown

bedevere-app bot commented Apr 10, 2026

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@aiwonderland aiwonderland changed the title gh-148830: Add docstrings to module colorsys in all functions gh-148330: Add docstrings to module colorsys in all functions Apr 10, 2026
# The ones in this library uses constants from the FCC version of NTSC.

def rgb_to_yiq(r, g, b):
"""Convert RGB to YIQ.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, but just to clean it up a little more, just put the string next to the start of the doctoring on another line. For example:
Instead of

"""Convert RGB to YIQ.
"""

It becomes

"""
Convert RGB to YIQ.
"""

And this change would apply to the other lines that follow this pattern as well.

@aisk aisk added the skip news label Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants