Skip to content

mypy/ipc.py: Remove some typeshed-related TODOs #13982

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

Merged
merged 1 commit into from
Nov 1, 2022

Conversation

AlexWaygood
Copy link
Member

As per the TODO comments, this PR removes some unnecessary asserts in mypy/ipc.py. When these asserts were added in #6148, typeshed wasn't able to use Literal types yet. However, nowadays, typeshed has precise Literal overloads for _winapi.WriteFile and _winapi.ConnectNamedType, meaning mypy is able to precisely infer the return type of these function calls without the need for the asserts in mypy/ipc.py: https://github.com/python/typeshed/blob/main/stdlib/_winapi.pyi.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 1, 2022

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks!

@hauntsaninja hauntsaninja merged commit fed90ca into python:master Nov 1, 2022
@AlexWaygood AlexWaygood deleted the mypy-todo branch November 1, 2022 18:33
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