-
Notifications
You must be signed in to change notification settings - Fork 20
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
Incorrect stub file causes type checking error #125
Comments
This was referenced Feb 9, 2023
andersk
added a commit
to andersk/zoneinfo
that referenced
this issue
Mar 4, 2023
Fixes pganssle#125. Ported from: python/typeshed@de0b366 Signed-off-by: Anders Kaseorg <[email protected]>
andersk
added a commit
to andersk/zoneinfo
that referenced
this issue
Mar 8, 2023
Fixes pganssle#125. Ported from: python/typeshed@de0b366 Signed-off-by: Anders Kaseorg <[email protected]>
pganssle
pushed a commit
to andersk/zoneinfo
that referenced
this issue
Mar 10, 2023
Fixes pganssle#125. Ported from: python/typeshed@de0b366 Signed-off-by: Anders Kaseorg <[email protected]>
sbrudenell
added a commit
to sbrudenell/btrfs2s3
that referenced
this issue
Jun 26, 2024
among other things, I hadn't realized that types-all was deprecated. this change exposed pganssle/zoneinfo#125. I have no explanation for why it wasn't exposed before, but rather than investigate this I'll choose to just fix it and assume it was previously shadowed by something in types-all.
sbrudenell
added a commit
to sbrudenell/btrfs2s3
that referenced
this issue
Jun 26, 2024
among other things, I hadn't realized that types-all was deprecated. this change exposed pganssle/zoneinfo#125. I have no explanation for why it wasn't exposed before, but rather than investigate this I'll choose to just fix it and assume it was previously shadowed by something in types-all.
sbrudenell
added a commit
to sbrudenell/btrfs2s3
that referenced
this issue
Jun 26, 2024
among other things, I hadn't realized that types-all was deprecated. this change exposed pganssle/zoneinfo#125. I have no explanation for why it wasn't exposed before, but rather than investigate this I'll choose to just fix it and assume it was previously shadowed by something in types-all.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The new release of mypy
1.0.0
exposed a problem in the typing of this module.The issue
Consider the following code:
Type-checking this with
mypy
will result in the following error:The solution
After some investigation, I noticed that the type stub file of
backports.zoneinfo
does not contain type information for the abstract methods ofZoneInfo
. The solution would be to add types for these methods.I don't mind making a PR for this if you want to make a new release including this fix. Let me know.
The workaround
A workaround for dealing with this issue is to import
ZoneInfo
from the submodule directly:The text was updated successfully, but these errors were encountered: