Repository navigation
Conversation
Part of PyCalendar#876. AI: Claude Opus 5.5 Prompt (summary): help pick a return type for vMonth.ical_value and draft tests. Output: Draft of the tests and docstring. I reviewed and edited them, wrote the news entry, and ran the full test suite locally.
jakkoyang
requested review from
niccokunzmann and
stevepiercy
as code owners
November 13, 2026 04:15
Contributor
|
Thanks for the pull request, @jakkoyang! A maintainer will review it shortly. |
Contributor
Insufficient dataNot enough activity yet to make a reliable assessment. This is an automated analysis by AgentScan |
Author
|
For vMonth I'm going with int(self) to match vInt. The RFC 7529 leap flag stays on vMonth.leap... it's purely additive, so nothing existing changes... im happy to switch if you'd prefer something else |
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
vMonthdidn't have anical_valueproperty, sovMonth(5).ical_valueraisedAttributeError.ical_valueproperty tovMonththat returns the month number as a plainint, the same wayvInt.ical_valuedoes5L, it returns5, and the leap flag stays available onvMonth.leaptest_vMonth.pycovering regular months, leap months, the plaininttype, theleapflag, and a month parsed from an RRULEPurely additive:
vMonthis still anintsubclass and.leapis unchanged, so existing code isn't affected/backwards compatible.AI disclosure: I used Claude Opus 5.5 to help pick the return type and draft the tests and docstring though I reviewed and edited them, wrote the news entry, and ran everything locally.
Checklist
Additional information
Before:
vMonth(5).ical_valueraisedAttributeErrorAfter:
vMonth(5).ical_value == 5andvMonth("5L").ical_value == 5I went with returning a plain
intto matchvInt, since an int subclass returningint(self)is the existing pattern, but if you'd prefer the leap flag to be part of the value instead (for example a NamedTuple likevN/vAdruse), I'm happy to change it!All tests pass locally (
uv run pytest).