Skip to content

Correct return type hint on rrule fixture - #2131

Open
AlexBritoOfficial wants to merge 3 commits into
PyCalendar:mainfrom
AlexBritoOfficial:issue938rrulefixturetypehint
Open

AlexBritoOfficial wants to merge 3 commits into
PyCalendar:mainfrom
AlexBritoOfficial:issue938rrulefixturetypehint

Conversation

@AlexBritoOfficial

Copy link
Copy Markdown

Linked issue

Description

Corrected the return type hint on the rrule fixture in test_rrule.py from str to vRecur. Its parametrized values, RRULE_0 through RRULE_4, are all vRecur.from_ical(...) results, not strings, so the previous hint was simply wrong.

Checklist

  • I added a change log entry, following the instructions in all subsections under Change log requirements.
  • I followed icalendar's Artificial intelligence policy and disclosed my Responsible AI use in my commit messages, if applicable.
  • I added or updated tests, if applicable.
  • I ran and ensured all tests pass locally by following Run tests.
  • I added or edited documentation as necessary, both as docstrings to be rendered in the API documentation and narrative documentation, following the Style guide.

Additional information

No behavior change; this fixes an incorrect existing type hint rather than adding a missing one.

AlexBritoOfficial and others added 3 commits November 15, 2026 20:47
rdate returns a date, datetime, or tuple of two datetimes from its
parametrized lambdas, so hint it as -> date | datetime |
tuple[datetime, datetime].

Contributes to PyCalendar#938

AI use: Claude Sonnet 5 helped find the untyped fixture and verify
the hint against its usage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
component returns an Event or Todo instance, matching the file's
existing ET alias, so hint it as -> ET.

Contributes to PyCalendar#938

AI use: Claude Sonnet 5 helped find the untyped fixture and verify
the hint against its usage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
rrule was hinted as -> str, but its params (RRULE_0 through
RRULE_4) are vRecur instances, so correct it to -> vRecur.

Contributes to PyCalendar#938

AI use: Claude Sonnet 5 helped find the incorrect hint and verify
the fix against its usage.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the pull request, @AlexBritoOfficial! A maintainer will review it shortly.

This branch has not been deployed

No deployments
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.

1 participant