Skip to content
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

Fixed a bug that led to incorrect type narrowing in the `type(x) is T… #6111

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

erictraut
Copy link
Collaborator

andtype(x) == Ttype guards whenT` is a dynamic type rather than a specific class. This addresses microsoft/pylance-release#4942.

…` and `type(x) == T` type guards when `T` is a dynamic type rather than a specific class. This addresses microsoft/pylance-release#4942.
@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@erictraut erictraut merged commit dd4d396 into main Oct 10, 2023
11 checks passed
@erictraut erictraut deleted the issue4942 branch October 10, 2023 04:50
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