Skip to content

Use source_type.last_known_value when Instance. Fixes #12923#15123

Merged
hauntsaninja merged 7 commits intopython:masterfrom
CarlFK:else
Apr 26, 2023
Merged

Use source_type.last_known_value when Instance. Fixes #12923#15123
hauntsaninja merged 7 commits intopython:masterfrom
CarlFK:else

Conversation

@CarlFK
Copy link
Copy Markdown
Contributor

@CarlFK CarlFK commented Apr 25, 2023

Fixes #12923

assert_type(42, int) ... had issues. #12923 was a bit of a mess as the OP was or wasn't currently accurate.

Added two tests to repo the current problem, which now pass.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread mypy/checkexpr.py Outdated
@github-actions
Copy link
Copy Markdown
Contributor

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

@hauntsaninja hauntsaninja merged commit 6b326d5 into python:master Apr 26, 2023
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.

assert_type() says an int is not an int

2 participants