-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[python-dateutil] add some missing parameter types #14992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[python-dateutil] add some missing parameter types #14992
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
srittau
left a comment
There was a problem hiding this 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.
| # args and kwargs are passed to list.__init__ | ||
| def __init__(self, *args: Any, **kwargs: Any) -> None: ... |
There was a problem hiding this comment.
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): ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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): ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| def append(self, val: str | int, label: str | None = None): ... | |
| def append(self, val: str | int, label: str | None = None) -> None: ... |
|
thank you for the suggestions! |
|
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]
|
No description provided.