-
Notifications
You must be signed in to change notification settings - Fork 22
Stub methods for abstract tzinfo to allow usage with mypy 1.0.0 #126
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import os | ||
| import typing | ||
| from datetime import datetime, tzinfo | ||
| from datetime import datetime, timedelta, tzinfo | ||
| from typing import ( | ||
| Any, | ||
| Iterable, | ||
|
|
@@ -30,6 +30,9 @@ class ZoneInfo(tzinfo): | |
| ) -> _T: ... | ||
| @classmethod | ||
| def clear_cache(cls, *, only_keys: Iterable[str] = ...) -> None: ... | ||
| def tzname(self, __dt: datetime | None) -> str | None: ... | ||
| def utcoffset(self, __dt: datetime | None) -> timedelta | None: ... | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not too concerned with this since it's maybe better taken up with They can take a I created a PR upstream in
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I continue to request that this be merged as-is, because the purpose of a backport is to optimize compatibility with the released upstream version, not to pursue incompatible improvements. Obviously you’re welcome to continue pursuing those improvements upstream, and then we can backport them here in the future. But there’s no reason to block this current backport on that. |
||
| def dst(self, __dt: datetime | None) -> timedelta | None: ... | ||
|
|
||
| # Note: Both here and in clear_cache, the types allow the use of `str` where | ||
| # a sequence of strings is required. This should be remedied if a solution | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.