-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Bump mypy to 0.981 #8796
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
Bump mypy to 0.981 #8796
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -1952,7 +1952,7 @@ if sys.version_info >= (3, 11): | |||
@overload | |||
def subgroup(self: Self, __condition: Callable[[_BaseExceptionT_co], bool]) -> Self | None: ... | |||
@overload | |||
def split( | |||
def split( # type: ignore[misc] # complaints about overlapping overloads |
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.
I believe these new mypy errors are already fixed on mypy master, by python/mypy#13461. Unfortunately, it doesn't look like that PR made it into 0.981 (cc. @hauntsaninja, @ilevkivskyi)
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.
cc @jhance if people will complain about this, we will need to CP it and release 0.982.
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.
@AlexWaygood mypy 0.982 was released with the fix for this.
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.
@Molkree thanks!
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.
Mypy was successfully bumped to 0.982 in #8831; the type ignore
s are gone again 🎉
Thanks @ilevkivskyi for the work on the patch release!
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
This PR should now be ready for review! |
if sys.version_info >= (3, 11): | ||
def __init__(self, name: str, value: str, group: str) -> 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.
The allowlist entry had a comment saying that it was to do with Protocol.__init__
, so I thought I could safely remove the allowlist entry now that we were bumping to mypy 0.981. Actually the comment was wrong, the allowlist entry had nothing to do with Protocol.__init__
. But I figured fixing the allowlist entry was just as easy as correcting the comment next to the entry.
@@ -72,7 +72,7 @@ class HTMLBinaryInputStream(HTMLUnicodeInputStream): | |||
def detectEncodingMeta(self): ... | |||
|
|||
class EncodingBytes(bytes): | |||
def __new__(cls, value): ... | |||
def __new__(self, value): ... |
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.
This change isn't strictly related to the mypy bump, but it was a very easy allowlist entry to fix, and it means that we can delete the whole allowlist for html5lib
since the other allowlist entry is now unused as of mypy 0.981.
Once I've got stdlib stubtest passing, I'll hit this PR with third-party stubtest as well, since there have been a fair few stubtest changes in this release.