Skip to content

Add return type hint to dtstamp_comp fixture - #2125

Open
AlexBritoOfficial wants to merge 2 commits into
PyCalendar:mainfrom
AlexBritoOfficial:issue-938-dtstamp-comp-type-hint
Open

AlexBritoOfficial wants to merge 2 commits into
PyCalendar:mainfrom
AlexBritoOfficial:issue-938-dtstamp-comp-type-hint

Conversation

@AlexBritoOfficial

@AlexBritoOfficial AlexBritoOfficial commented Nov 15, 2026 •

Copy link
Copy Markdown

Linked issue

Description

Added an Event | Todo | Journal | FreeBusy return type hint to the dtstamp_comp test fixture in test_component.py. It returns one of these depending on request.param.

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.

dtstamp_comp returns one of Event, Todo, Journal, or FreeBusy
depending on request.param, so hint it accordingly.

Contributes to PyCalendar#938

AI use: Claude Sonnet 5, used to find the untyped fixture, verify
its usages in test_component.py, and draft/verify the type hint.
Prompt: "Are there any untyped functions that need hinted types in
/tests/attr" followed by review and confirmation of the fix.

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