Skip to content

Add return type hint to exdate fixture - #2128

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

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

Conversation

@AlexBritoOfficial

Copy link
Copy Markdown

Linked issue

Description

Added a -> date | datetime return type hint to the exdate fixture in test_exdates.py. It returns the result of calling one of its parametrized lambdas, each of which produces a date or a datetime.

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.

exdate returns a date or datetime value from its parametrized
lambdas, so hint it as -> date | 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