Skip to content

Add return type hint to rdate fixture - #2129

Open
AlexBritoOfficial wants to merge 1 commit into
PyCalendar:mainfrom
AlexBritoOfficial:issue938rdatefixturetypehint
Open

AlexBritoOfficial wants to merge 1 commit into
PyCalendar:mainfrom
AlexBritoOfficial:issue938rdatefixturetypehint

Conversation

@AlexBritoOfficial

Copy link
Copy Markdown

Linked issue

Description

Added a date | datetime | tuple[datetime, datetime] return type hint to the rdate fixture in test_rdate.py. It returns the result of calling one of its parametrized lambdas, which produce a date, a datetime, or a tuple of two datetimes.

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; type-hint-only fix. No new tests or docs needed.

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>
@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