Skip to content

Add type hints to vRecur class - #1959

Open
fishingpoleroid wants to merge 7 commits into
PyCalendar:mainfrom
fishingpoleroid:type-hints-vrecur
Open

fishingpoleroid wants to merge 7 commits into
PyCalendar:mainfrom
fishingpoleroid:type-hints-vrecur

Conversation

@fishingpoleroid

@fishingpoleroid fishingpoleroid commented Oct 15, 2026 •

Copy link
Copy Markdown

Fixes #1930

Added parameter and return type hints to vRecur methods (to_ical, parse_type, from_ical, and to_jcal).
Tested changes locally with pytest -k vRecur.

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

Insufficient data

Not enough activity yet to make a reliable assessment.

View full analysis →

This is an automated analysis by AgentScan

@github-actions github-actions Bot added the ai-suspicion This contribution is possibly created with lots of AI help without enough human understanding. label Oct 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request did not pass quality checks and AI use is suspected. Please review Contribute and make any necessary amendments.

@Gabriel2002Can Gabriel2002Can mentioned this pull request Oct 16, 2026
4 of 5 tasks

@niccokunzmann niccokunzmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice and ready. Please add your github handle and disclose AI guidance if you prompted one.
Thanks!

Comment thread news/1930.internal Outdated
@@ -0,0 +1 @@
Added type hints to vRecur class. No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, please add your github handle here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh it needs to be one line!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Sorry for the oversight.

@niccokunzmann niccokunzmann mentioned this pull request Oct 20, 2026
5 tasks done
@faresrafat3

Copy link
Copy Markdown

Reviewed this locally on the PR branch.\n\nThe change. Type hints only — adds return type annotations to vRecur class. No runtime change.\n\nNothing to fix. Mergeable once CI is green.

@niccokunzmann

Copy link
Copy Markdown
Member

Another note: Please have a look at this. I think the until value is NEVER inside a list. That might be important for typing, so it is flagged up: #1987

@niccokunzmann

Copy link
Copy Markdown
Member

@fishingpoleroid Could you address the review and please add resolve the merge conflicts?

@fishingpoleroid

fishingpoleroid commented Oct 30, 2026 •

Copy link
Copy Markdown
Author

Conflicts resolved, and news file updated.

@niccokunzmann niccokunzmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes. Here is another review.


@classmethod
def parse_type(cls, key, values):
def parse_type(cls, key: str, values: str) -> list[Any]:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, this could be list[VPROPERTY] could you check?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe .from_ical() method returns python primitives. List[Any] would be appropriate here.

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

Labels

ai-suspicion This contribution is possibly created with lots of AI help without enough human understanding.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proper typing for vRecur

3 participants