Skip to content

Conversation

@lev-blit
Copy link
Contributor

@lev-blit lev-blit commented Nov 7, 2025

No description provided.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@lev-blit lev-blit marked this pull request as ready for review November 7, 2025 17:45
Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks, just a few notes.

Comment on lines 66 to 67
# args and kwargs are passed to list.__init__
def __init__(self, *args: Any, **kwargs: Any) -> None: ...
Copy link
Collaborator

Choose a reason for hiding this comment

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

In that case we should either copy the list constructor or probably just remove it from _ymt and let it inherit the signature from list.

def could_be_day(self, value): ...
def append(self, val, label=None): ...
def _resolve_from_stridxs(self, strids): ...
def could_be_day(self, value: int): ...
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def could_be_day(self, value: int): ...
def could_be_day(self, value: int) -> bool: ...

def append(self, val, label=None): ...
def _resolve_from_stridxs(self, strids): ...
def could_be_day(self, value: int): ...
def append(self, val: str | int, label: str | None = None): ...
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def append(self, val: str | int, label: str | None = None): ...
def append(self, val: str | int, label: str | None = None) -> None: ...

@lev-blit
Copy link
Contributor Author

lev-blit commented Nov 7, 2025

thank you for the suggestions!

@github-actions
Copy link
Contributor

github-actions bot commented Nov 7, 2025

Diff from mypy_primer, showing the effect of this PR on open source code:

core (https://github.com/home-assistant/core)
+ homeassistant/components/habitica/calendar.py:101: error: Redundant cast to "list[datetime]"  [redundant-cast]

@srittau srittau merged commit e524443 into python:main Nov 7, 2025
48 checks passed
@lev-blit lev-blit deleted the python-dateutil/add-missing-types branch November 7, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants