Repository navigation
Rewrite the COLOR property docstring in Pythonic style - #2160
Open
sneha-shukla-dev wants to merge 1 commit into
Open
sneha-shukla-dev wants to merge 1 commit into
sneha-shukla-dev wants to merge 1 commit into
Conversation
The shared color_property docstring still used RFC section headings (Property Parameters, Conformance, Description). Replace them with a summary, implementation notes, cross-references to Event.color, Journal.color, and Todo.color, a doctest example, and a pointer to Calendar.color. AI disclosure: I used an AI assistant (Grok Bot) to help pick one unchecked PyCalendar#1244 item not already covered by an open pull request, compare the old docstring with the categories_property and Calendar.color examples, rewrite it to the project style guide, and prepare the changelog entry. Prompts summarized: list remaining RFC-style docstrings for issue PyCalendar#1244; avoid Alarm trigger items already in PR PyCalendar#2094; rewrite color_property; add news/1244.documentation.3 with the required AI disclosure. Output: this commit.
sneha-shukla-dev
requested review from
angatha,
niccokunzmann and
stevepiercy
as code owners
November 19, 2026 11:47
Contributor
|
Thanks for the pull request, @sneha-shukla-dev! A maintainer will review it shortly. |
Contributor
|
One or more PR-quality checks did not pass. Review the PR Quality Checks summary in the workflow run for the failed checks and their details, then make any necessary updates. Checklist items may remain unchecked while work is in progress. Please tick each item as you complete it. If you used AI assistance, follow the project's Responsible AI use policy and provide the required disclosures. |
Contributor
Insufficient dataNot enough activity yet to make a reliable assessment. Evidence
This is an automated analysis by AgentScan |
This branch has not been deployed
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.
Linked issue
Description
This replaces the RFC copy-paste in the shared
color_propertydocstring, which is used byEvent.color,Journal.color, andTodo.color. The previous text used RFC section headings (Property Parameters, Conformance, Description) that the docstring style check rejects. The new docstring has a short summary, notes that this isCOLORfrom RFC 7986 section 5.9, links the three component attributes, includes a doctest that prints the decoded iCalendar form and reads the value back, and points toCalendar.colorfor the calendar-level property (including theX-APPLE-CALENDAR-COLORalias).I did not change
Calendar.color, which already has a rewritten docstring, and I did not touch Alarm trigger properties, which are covered by open pull request #2094.Open pull requests #1835 and #1967 also edit
src/icalendar/attr/__init__.py, but they change other functions, notcolor_property. See #1835 and #1967.Open pull request #2153 also edits that file to mark private helpers with
:meta private:, notcolor_property. See #2153.I used an AI assistant (Grok Bot) to help identify an unchecked #1244 item that was not already covered by an open pull request, draft the rewritten docstring from the style guide and nearby examples such as
categories_propertyandCalendar.color, and prepare the changelog entry and this pull request description.Checklist
Additional information
I did not add new tests; the rewritten example is exercised by the existing doctest suite. I ran
ruff format --checkandruff checkonsrc/icalendar/attr/__init__.py,pytest src/icalendar/tests/test_with_doctest.py -k "icalendar.attr"(2 passed),pytest src/icalendar/tests/test_docstrings.py(1877 passed, 563 xfailed),pytest -k colorexcluding fuzz tests (54 passed), andsphinx-build -W -b html(build succeeded; the new wording appears on the Event, Journal, and Todo API pages). I did not run the full tox matrix.The changelog fragment is
news/1244.documentation.3.